Re: (subset) [PATCH 1/2] fs: ignore RLIMIT_FSIZE above LLONG_MAX in generic_write_check_limits()
From: Christian Brauner
Date: Wed Nov 18 2026 - 08:53:51 EST
On Wed, 18 Nov 2026 01:31:28 +0800, Ding Feng wrote:
> generic_write_check_limits() stores rlimit(RLIMIT_FSIZE), an unsigned
> long, in a loff_t. A soft limit between 2^63 and RLIM_INFINITY becomes
> negative there, so "pos >= limit" holds for every position: each write
> through generic_write_checks() or copy_file_range() fails with -EFBIG
> and raises SIGXFSZ, although no file position can reach such a limit.
>
> Reproducer (bash counts ulimit -f in 1024-byte blocks, so 2^53 blocks
> is 2^63 bytes):
>
> [...]
Applied to the vfs-7.5.misc branch of the vfs/vfs.git tree.
Patches in the vfs-7.5.misc 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-7.5.misc
[1/2] fs: ignore RLIMIT_FSIZE above LLONG_MAX in generic_write_check_limits()
https://git.kernel.org/vfs/vfs/c/bc0dc4379463