From: Andrew Morton Cc: Stephen Smalley Signed-off-by: Andrew Morton --- 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 --- devel/security/selinux/hooks.c~security-enable-atomic-inode-security-labeling-use-kstrdup 2005-07-30 00:43:55.000000000 -0700 +++ devel-akpm/security/selinux/hooks.c 2005-07-30 00:43:55.000000000 -0700 @@ -2059,10 +2059,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); _