aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Morton2012-05-31 18:26:02 -0500
committerLinus Torvalds2012-05-31 19:49:26 -0500
commit4f1c28d241d0882f25112d494885cd6084db225b (patch)
tree4332c441b47b3ce6f29b424d24923aebdc44d7eb /security/keys
parentecb41a77411358d385e3fde5b4e98a5f3d9cfdd5 (diff)
downloadkernel-common-4f1c28d241d0882f25112d494885cd6084db225b.tar.gz
kernel-common-4f1c28d241d0882f25112d494885cd6084db225b.tar.xz
kernel-common-4f1c28d241d0882f25112d494885cd6084db225b.zip
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 <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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/keys')
-rw-r--r--security/keys/keyctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/keys/keyctl.c b/security/keys/keyctl.c
index ddb3e05bc5f..18f29de88fd 100644
--- a/security/keys/keyctl.c
+++ b/security/keys/keyctl.c
@@ -84,7 +84,7 @@ SYSCALL_DEFINE5(add_key, const char __user *, _type,
84 vm = false; 84 vm = false;
85 if (_payload) { 85 if (_payload) {
86 ret = -ENOMEM; 86 ret = -ENOMEM;
87 payload = kmalloc(plen, GFP_KERNEL); 87 payload = kmalloc(plen, GFP_KERNEL | __GFP_NOWARN);
88 if (!payload) { 88 if (!payload) {
89 if (plen <= PAGE_SIZE) 89 if (plen <= PAGE_SIZE)
90 goto error2; 90 goto error2;