fs/binfmt_misc.c: use GFP_KERNEL instead of GFP_USER
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 10 Dec 2014 23:52:13 +0000 (15:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Dec 2014 01:41:12 +0000 (17:41 -0800)
GFP_USER means "honour cpuset nodes-allowed beancounting".  These are
regular old kernel objects and there seems no reason to give them this
treatment.

Acked-by: Mike Frysinger <vapier@gentoo.org>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/binfmt_misc.c

index 01a2cd9ab2bf74fae4ccb27214c26405089a1929..70789e198dea9249e1ad3388a25ba209769acb12 100644 (file)
@@ -308,7 +308,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
 
        err = -ENOMEM;
        memsize = sizeof(Node) + count + 8;
-       e = kmalloc(memsize, GFP_USER);
+       e = kmalloc(memsize, GFP_KERNEL);
        if (!e)
                goto out;
 
@@ -416,7 +416,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
 
                        if (e->mask) {
                                int i;
-                               char *masked = kmalloc(e->size, GFP_USER);
+                               char *masked = kmalloc(e->size, GFP_KERNEL);
 
                                print_hex_dump_bytes(
                                        KBUILD_MODNAME ": register:  mask[decoded]: ",