diff options
| author | Gao Xiang <[email protected]> | 2024-11-15 17:36:51 +0000 |
|---|---|---|
| committer | Gao Xiang <[email protected]> | 2024-11-18 10:50:14 +0000 |
| commit | 0bc8061ffc733a0a246b8689b2d32a3e9204f43c (patch) | |
| tree | 6b813ab7246ef5a4aebd27ea2d46fbc177c6a259 /fs/xfs/libxfs/xfs_rmap.c | |
| parent | erofs: clarify direct I/O support (diff) | |
| download | kernel-0bc8061ffc733a0a246b8689b2d32a3e9204f43c.tar.gz kernel-0bc8061ffc733a0a246b8689b2d32a3e9204f43c.zip | |
erofs: handle NONHEAD !delta[1] lclusters gracefully
syzbot reported a WARNING in iomap_iter_done:
iomap_fiemap+0x73b/0x9b0 fs/iomap/fiemap.c:80
ioctl_fiemap fs/ioctl.c:220 [inline]
Generally, NONHEAD lclusters won't have delta[1]==0, except for crafted
images and filesystems created by pre-1.0 mkfs versions.
Previously, it would immediately bail out if delta[1]==0, which led to
inadequate decompressed lengths (thus FIEMAP is impacted). Treat it as
delta[1]=1 to work around these legacy mkfs versions.
`lclusterbits > 14` is illegal for compact indexes, error out too.
Reported-by: [email protected]
Closes: https://lore.kernel.org/r/[email protected]
Tested-by: [email protected]
Fixes: d95ae5e25326 ("erofs: add support for the full decompressed length")
Fixes: 001b8ccd0650 ("erofs: fix compact 4B support for 16k block size")
Signed-off-by: Gao Xiang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.c')
0 files changed, 0 insertions, 0 deletions
