
From: Andrew Morton <akpm@osdl.org>

Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 security/selinux/hooks.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN security/selinux/hooks.c~security-enable-atomic-inode-security-labeling-use-kstrdup security/selinux/hooks.c
--- 25/security/selinux/hooks.c~security-enable-atomic-inode-security-labeling-use-kstrdup	Fri Jul  8 16:35:01 2005
+++ 25-akpm/security/selinux/hooks.c	Fri Jul  8 16:35:01 2005
@@ -2058,10 +2058,9 @@ static int selinux_inode_init_security(s
 
 	inode_security_set_sid(inode, newsid);
 
-	namep = kmalloc(sizeof(XATTR_SELINUX_SUFFIX), GFP_KERNEL);
+	namep = kstrdup(XATTR_SELINUX_SUFFIX, GFP_KERNEL);
 	if (!namep)
 		return -ENOMEM;
-	strcpy(namep, XATTR_SELINUX_SUFFIX);
 	*name = namep;
 
 	rc = security_sid_to_context(newsid, &context, len);
_
