Commit 703bf2d1 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

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: default avatarDave Jones <>
Cc: Al Viro <>
Cc: Dave Chinner <>
Acked-by: default avatarDavid Rientjes <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent b82c3287
......@@ -496,7 +496,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
if (size) {
if (size > XATTR_LIST_MAX)
klist = kmalloc(size, GFP_KERNEL);
klist = kmalloc(size, __GFP_NOWARN | GFP_KERNEL);
if (!klist)
return -ENOMEM;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment