kernel-fxtec-pro1x/drivers/staging/erofs
Gao Xiang b56d00ace1 erofs: zero out when listxattr is called with no xattr
commit 926d1650176448d7684b991fbe1a5b1a8289e97c upstream.

As David reported [1], ENODATA returns when attempting
to modify files by using EROFS as an overlayfs lower layer.

The root cause is that listxattr could return unexpected
-ENODATA by mistake for inodes without xattr. That breaks
listxattr return value convention and it can cause copy
up failure when used with overlayfs.

Resolve by zeroing out if no xattr is found for listxattr.

[1] https://lore.kernel.org/r/CAEvUa7nxnby+rxK-KRMA46=exeOMApkDMAV08AjMkkPnTPV4CQ@mail.gmail.com
Link: https://lore.kernel.org/r/20191201084040.29275-1-hsiangkao@aol.com
Fixes: cadf1ccf1b00 ("staging: erofs: add error handling for xattr submodule")
Cc: <stable@vger.kernel.org> # 4.19+
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-17 20:35:00 +01:00
..
include
data.c
dir.c
erofs_fs.h
inode.c
internal.h
Kconfig
lz4defs.h
Makefile
namei.c
super.c
TODO
unzip_lz4.c
unzip_pagevec.h
unzip_vle.c staging: erofs: detect potential multiref due to corrupted images 2019-10-11 18:21:41 +02:00
unzip_vle.h
unzip_vle_lz4.c
utils.c
xattr.c erofs: zero out when listxattr is called with no xattr 2019-12-17 20:35:00 +01:00
xattr.h