From: Andrew Morton Date: Thu, 12 Apr 2012 22:52:10 +0000 (+1000) Subject: security/keys/keyctl.c: suppress memory allocation failure warning X-Git-Tag: next-20120417~2^2~64 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=069ec24e35e1062f8c4515c198530fad53567100;p=karo-tx-linux.git security/keys/keyctl.c: suppress memory allocation failure warning 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 Cc: David Howells Cc: James Morris Signed-off-by: Andrew Morton --- diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c index fb767c6cd99f..788cfc6965d2 100644 --- a/security/keys/keyctl.c +++ b/security/keys/keyctl.c @@ -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;