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>
This commit is contained in:
Родитель
b82c32872d
Коммит
703bf2d122
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче