[patch 1/1] selinux: change file_alloc_security to use GFP_KERNEL

From: Stephen Smalley
Date: Thu Jan 19 2006 - 13:50:58 EST


This patch changes the SELinux file_alloc_security function to use
GFP_KERNEL rather than GFP_ATOMIC; the use of GFP_ATOMIC appears to be a
remnant of when this function was being called with the files_lock
spinlock held, and is no longer necessary. Please apply.

Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
Acked-by: James Morris <jmorris@xxxxxxxxx>

---

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

Index: linux-2.6/security/selinux/hooks.c
===================================================================
RCS file: /nfshome/pal/CVS/linux-2.6/security/selinux/hooks.c,v
retrieving revision 1.175
diff -u -p -r1.175 hooks.c
--- linux-2.6/security/selinux/hooks.c 3 Jan 2006 16:36:59 -0000 1.175
+++ linux-2.6/security/selinux/hooks.c 18 Jan 2006 18:27:18 -0000
@@ -191,7 +191,7 @@ static int file_alloc_security(struct fi
struct task_security_struct *tsec = current->security;
struct file_security_struct *fsec;

- fsec = kzalloc(sizeof(struct file_security_struct), GFP_ATOMIC);
+ fsec = kzalloc(sizeof(struct file_security_struct), GFP_KERNEL);
if (!fsec)
return -ENOMEM;




--
Stephen Smalley
National Security Agency

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/