diff options
author | Dave Jones <[email protected]> | 2012-04-05 14:25:06 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2012-04-05 15:25:50 -0700 |
commit | 703bf2d122c95412a30f72658c53ad6292867b0b (patch) | |
tree | a949f0f54df7e1e2aed731a1be9a536c4d16287e | |
parent | b82c32872db20667d6ee8e2ea1e7bdec791bdcc7 (diff) |
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 <[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]>
-rw-r--r-- | fs/xattr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xattr.c b/fs/xattr.c index d6dfd247bb2f..a14d842ccb21 100644 --- a/fs/xattr.c +++ b/fs/xattr.c @@ -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; } |