summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorHungyu Lin <dennylin0707@gmail.com>2026-10-26 01:57:38 +0000
committerChristian Brauner <brauner@kernel.org>2026-10-30 16:06:00 +0100
commit81dfa035891f0502674332ee97db348a16486de0 (patch)
treecc6c5b414a10611d224d33cc463221c30cf43e16 /tools/lib/python/kdoc
parentfc9577079df8a44ccbf39d2f06634017d286e4f0 (diff)
fs: skip copy_file_range write limits when there is no data
generic_copy_file_checks() reduces count to zero for a source offset at or beyond EOF, but still checks the destination write limits. If pos_out is at RLIMIT_FSIZE, this sends SIGXFSZ and returns -EFBIG even though there is no data to write. For example, GNU cat copying a 1024-byte regular file to another regular file with RLIMIT_FSIZE=1024 copies all bytes and is then killed by its next copy_file_range() call at EOF. A zero-length request can fail in the same way. Check write limits only when count is nonzero, as the ordinary write checks already do. Keep the other copy validation in place. Fixes: 96e6e8f4a68d ("vfs: add missing checks to copy_file_range") Cc: stable@vger.kernel.org Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Link: https://patch.msgid.link/20261026015738.46230-1-dennylin0707@gmail.com Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions