<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Andrew Morton &lt;akpm@osdl.org&gt;

Cc: Stephen Smalley &lt;sds@tycho.nsa.gov&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 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, &amp;context, len);
_
</pre></body></html>