diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2026-10-16 09:33:58 +0200 |
|---|---|---|
| committer | Amir Goldstein <amir73il@gmail.com> | 2026-10-29 13:20:07 +0100 |
| commit | e6b9117076fb4c0ff4a670efa9c876d9a50d79ab (patch) | |
| tree | aa13f2c1ef6973e2d39f7d34da6210b762ee1a74 /scripts/Makefile.thinlto | |
| parent | 755b5c5c9277be251a51623d6065abab948c61bc (diff) | |
| download | linux-e6b9117076fb4c0ff4a670efa9c876d9a50d79ab.tar.gz linux-e6b9117076fb4c0ff4a670efa9c876d9a50d79ab.zip | |
ovl: fortify ovl_copy_xattr() against underlying layer modifications
Adapt ovl_getxattr_value() to be used from ovl_copy_xattr(), by
allowing to pass it a pre-allocated buffer, which can be resized
and by handling the ENODATA/EOPNOTSUPP return codes in the caller.
This replaces the retry loop in ovl_copy_xattr() with a single retry
after resizing the buffer. If the value changed again by then, the
underlying layer was modified, so return -EIO instead of retrying.
As a side effect, ovl_copy_up_meta_inode_data() now returns -EIO instead
of -ERANGE in this case of underlying xattr size changes.
Reported-by: Fahad Alharbi <fahad@codepure.com>
Tested-by: Fahad Alharbi <fahad@codepure.com>
Suggested-by: Miklos Szeredi <miklos@szeredi.hu>
Link: https://lore.kernel.org/linux-fsdevel/CAJfpegsVoUyqy0dYkTvBGRZvgdv_nmzmCw_uF+LP-Vq3EhEkSg@mail.gmail.com/
Fixes: e4ad29fa0d22 ("ovl: use a minimal buffer in ovl_copy_xattr")
Cc: stable@vger.kernel.org
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
