Skip to content

Commit

Permalink
fs/xattr.c: suppress page allocation failure warnings from sys_listxa…
Browse files Browse the repository at this point in the history
…ttr()

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 <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Dave Chinner <[email protected]>
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Dave Jones authored and torvalds committed Apr 5, 2012
1 parent b82c328 commit 703bf2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
if (size) {
if (size > XATTR_LIST_MAX)
size = XATTR_LIST_MAX;
klist = kmalloc(size, GFP_KERNEL);
klist = kmalloc(size, __GFP_NOWARN | GFP_KERNEL);
if (!klist)
return -ENOMEM;
}
Expand Down

0 comments on commit 703bf2d

Please sign in to comment.