]> 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>
Thu, 12 Apr 2012 22:52:10 +0000 (08:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 17 Apr 2012 03:47:22 +0000 (13:47 +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>
Cc: 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;