Преглед изворни кода

selinux: prevent rentry into the FS

BUG fix.  Keep us from re-entering the fs when we aren't supposed to.

See discussion at
http://marc.info/?t=120716967100004&r=1&w=2

Signed-off-by: Josef Bacik <jbacik@redhat.com>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: James Morris <jmorris@namei.org>
Josef Bacik пре 17 година
родитељ
комит
a02fe13297
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      security/selinux/hooks.c

+ 2 - 2
security/selinux/hooks.c

@@ -180,7 +180,7 @@ static int inode_alloc_security(struct inode *inode)
 	struct task_security_struct *tsec = current->security;
 	struct task_security_struct *tsec = current->security;
 	struct inode_security_struct *isec;
 	struct inode_security_struct *isec;
 
 
-	isec = kmem_cache_zalloc(sel_inode_cache, GFP_KERNEL);
+	isec = kmem_cache_zalloc(sel_inode_cache, GFP_NOFS);
 	if (!isec)
 	if (!isec)
 		return -ENOMEM;
 		return -ENOMEM;
 
 
@@ -2429,7 +2429,7 @@ static int selinux_inode_init_security(struct inode *inode, struct inode *dir,
 		return -EOPNOTSUPP;
 		return -EOPNOTSUPP;
 
 
 	if (name) {
 	if (name) {
-		namep = kstrdup(XATTR_SELINUX_SUFFIX, GFP_KERNEL);
+		namep = kstrdup(XATTR_SELINUX_SUFFIX, GFP_NOFS);
 		if (!namep)
 		if (!namep)
 			return -ENOMEM;
 			return -ENOMEM;
 		*name = namep;
 		*name = namep;