simple_xattr: permit 0-size extended attributes
authorHugh Dickins <hughd@google.com>
Wed, 23 Jul 2014 21:00:17 +0000 (14:00 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Jul 2014 22:10:55 +0000 (15:10 -0700)
commit4e66d445d0421a159135572a0ba44b75c7c4adfa
treeedef8d8ebd021624dd89a0ed5f157d16e1156313
parent792ceaefe62189e3beea612ec0a052e42a81e993
simple_xattr: permit 0-size extended attributes

If a filesystem uses simple_xattr to support user extended attributes,
LTP setxattr01 and xfstests generic/062 fail with "Cannot allocate
memory": simple_xattr_alloc()'s wrap-around test mistakenly excludes
values of zero size.  Fix that off-by-one (but apparently no filesystem
needs them yet).

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Jeff Layton <jlayton@poochiereds.net>
Cc: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/xattr.c
This page took 0.024418 seconds and 5 git commands to generate.