diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-02 04:35:56 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-02 04:35:56 +0200 |
commit | a4251ab9896cefd75926b11c45aa477f8464cdec (patch) | |
tree | 64da1d49438ba5668d2432911fb7b7b1e3a48482 /fs | |
parent | Merge tag 'xfs-5.18-merge-4' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux (diff) | |
parent | fs: fix an infinite loop in iomap_fiemap (diff) | |
download | linux-a4251ab9896cefd75926b11c45aa477f8464cdec.tar.xz linux-a4251ab9896cefd75926b11c45aa477f8464cdec.zip |
Merge tag 'vfs-5.18-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull vfs fix from Darrick Wong:
"The erofs developers felt that FIEMAP should handle ranged requests
starting at s_maxbytes by returning EFBIG instead of passing the
filesystem implementation a nonsense 0-byte request.
Not sure why they keep tagging this 'iomap', but the VFS shouldn't be
asking for information about ranges of a file that the filesystem
already declared that it does not support.
- Fix a potential infinite loop in FIEMAP by fixing an off by one
error when comparing the requested range against s_maxbytes"
* tag 'vfs-5.18-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
fs: fix an infinite loop in iomap_fiemap
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ioctl.c b/fs/ioctl.c index 090bf47606ab..80ac36aea913 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c @@ -173,7 +173,7 @@ int fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo, if (*len == 0) return -EINVAL; - if (start > maxbytes) + if (start >= maxbytes) return -EFBIG; /* |