From: Stephen Smalley Date: Wed, 1 Feb 2006 11:05:55 +0000 (-0800) Subject: [PATCH] selinux: change file_alloc_security to use GFP_KERNEL X-Git-Tag: firefly_0821_release~38449 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=26d2a4be6a56eec575dac651f6606756a971f0fb;p=firefly-linux-kernel-4.4.55.git [PATCH] selinux: change file_alloc_security to use GFP_KERNEL 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 Acked-by: James Morris Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 1bb5eea3b8c1..5e61635610bb 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -192,7 +192,7 @@ static int file_alloc_security(struct file *file) 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;