]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
security/keys/keyctl.c: suppress memory allocation failure warning
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 25 Apr 2012 01:03:48 +0000 (11:03 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 30 Apr 2012 05:17:27 +0000 (15:17 +1000)
This allocation may be large.  The code is probing to see if it will
succeed and if not, it falls back to vmalloc().  We should suppress any
page-allocation failure messages when the fallback happens.

Reported-by: Dave Jones <davej@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Cc: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
security/keys/keyctl.c

index fb767c6cd99f6a92da8fa989999a18988bce1a19..788cfc6965d2558b039748823ba1e993451fb10f 100644 (file)
@@ -84,7 +84,7 @@ SYSCALL_DEFINE5(add_key, const char __user *, _type,
        vm = false;
        if (_payload) {
                ret = -ENOMEM;
-               payload = kmalloc(plen, GFP_KERNEL);
+               payload = kmalloc(plen, GFP_KERNEL | __GFP_NOWARN);
                if (!payload) {
                        if (plen <= PAGE_SIZE)
                                goto error2;