Skip to content

Commit

Permalink
security/keys/keyctl.c: suppress memory allocation failure warning
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: David Howells <[email protected]>
Cc: James Morris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
akpm00 authored and torvalds committed Jun 1, 2012
1 parent ecb41a7 commit 4f1c28d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/keys/keyctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4f1c28d

Please sign in to comment.