Re: [PATCH] fs: allow sendfile EOF at the file size limit
From: Christian Brauner
Date: Fri Nov 06 2026 - 08:41:45 EST
On Tue, 27 Oct 2026 04:42:57 +0000, Hungyu Lin wrote:
> do_sendfile() returns EOVERFLOW when a positive-count request starts
> at the effective file size limit. If the input file ends exactly at
> that limit, this rejects the final EOF probe even though no bytes
> remain to be copied.
>
> For example, Python 3.12 shutil.copyfile() copies all 4294967295 bytes
> of a maximum-size FAT32 file to ext4, then raises EOVERFLOW on its
> next sendfile() call instead of completing successfully.
>
> [...]
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/1] fs: allow sendfile EOF at the file size limit
https://git.kernel.org/vfs/vfs/c/7c1cb643ddb7