Re: [PATCH v1 0/2] fs: fix and deduplicate whence handling in default_llseek()
From: Christian Brauner
Date: Thu Nov 05 2026 - 16:57:14 EST
On Sat, 31 Oct 2026 23:00:47 -0700, Siddharth Chintamaneni wrote:
> This series fixes negative offset validation for SEEK_DATA and SEEK_HOLE
> in default_llseek() and deduplicates its whence handling with
> must_set_pos().
>
> Patch 1 updates default_llseek() to read the inode size once via
> i_size_read(inode) and compare (unsigned long long)offset >= eof for
> SEEK_DATA and SEEK_HOLE so negative offsets fail with -ENXIO instead of
> bypassing the range check.
>
> [...]
Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes
[1/2] fs: reject negative offsets for SEEK_DATA and SEEK_HOLE in default_llseek()
https://git.kernel.org/vfs/vfs/c/7a5783cfac71
[2/2] fs: use must_set_pos() in default_llseek()
https://git.kernel.org/vfs/vfs/c/1284ecd57375