diff options
author | Gao Xiang <[email protected]> | 2019-12-01 16:01:09 +0800 |
---|---|---|
committer | Gao Xiang <[email protected]> | 2019-12-04 21:15:04 +0800 |
commit | 926d1650176448d7684b991fbe1a5b1a8289e97c (patch) | |
tree | d32aa6dc1ce20ac6950b5b52b409a7098c9bc54d /tools/perf/util/trace-event-scripting.c | |
parent | 219d54332a09e8d8741c1e1982f5eae56099de85 (diff) |
erofs: zero out when listxattr is called with no xattr
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/[email protected]
Fixes: cadf1ccf1b00 ("staging: erofs: add error handling for xattr submodule")
Cc: <[email protected]> # 4.19+
Reviewed-by: Chao Yu <[email protected]>
Signed-off-by: Gao Xiang <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions