Commit 703bf2d122c95412a30f72658c53ad6292867b0b

Authored by Dave Jones
Committed by Linus Torvalds
1 parent b82c32872d

fs/xattr.c: suppress page allocation failure warnings from sys_listxattr()

This size is user controllable, up to a maximum of XATTR_LIST_MAX (64k).
So it's trivial for someone to trigger a stream of order:4 page
allocation errors.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Chinner <david@fromorbit.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -496,7 +496,7 @@
496 496 if (size) {
497 497 if (size > XATTR_LIST_MAX)
498 498 size = XATTR_LIST_MAX;
499   - klist = kmalloc(size, GFP_KERNEL);
  499 + klist = kmalloc(size, __GFP_NOWARN | GFP_KERNEL);
500 500 if (!klist)
501 501 return -ENOMEM;
502 502 }