diff options
author | Wei Gao <wegao@suse.com> | 2025-06-13 11:18:38 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2025-06-13 11:38:25 +0200 |
commit | a099b09a3342a0b28ea330e405501b5b4d0424b4 (patch) | |
tree | 625dadeade164f588826ed83d1a4cdca12ed6110 /lib/crypto/mpi/mpi-cmp.c | |
parent | 27605c8c0f69e319df156b471974e4e223035378 (diff) |
ext2: Handle fiemap on empty files to prevent EINVAL
Previously, ext2_fiemap would unconditionally apply "len = min_t(u64, len,
i_size_read(inode));", When inode->i_size was 0 (for an empty file), this
would reduce the requested len to 0. Passing len = 0 to iomap_fiemap could
then result in an -EINVAL error, even for valid queries on empty files.
Link: https://github.com/linux-test-project/ltp/issues/1246
Signed-off-by: Wei Gao <wegao@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20250613152402.3432135-1-wegao@suse.com
Diffstat (limited to 'lib/crypto/mpi/mpi-cmp.c')
0 files changed, 0 insertions, 0 deletions