summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue.h
diff options
context:
space:
mode:
authorAvi Weiss <thnkslprpt@gmail.com>2026-10-31 09:22:09 +0200
committerChristian Brauner <brauner@kernel.org>2026-11-05 18:22:02 +0100
commitd87631c337258a90e10ffa76eb76bb5b5d559a40 (patch)
tree20a3452e603d1d97451944fdba8b3d4f711998d1 /include/linux/timerqueue.h
parent9f4413e522faed76f4cf610098b2369eb3ba1f1c (diff)
fs: clamp FIONREAD result to int range
FIONREAD returns the difference between the file size and the current position in an int. When the difference is outside the int range, the result wraps, so a file with 4 GiB remaining can be reported as empty. Clamp the result to the signed int range before returning it to userspace. Preserve negative counts for file positions past EOF. Signed-off-by: Avi Weiss <thnkslprpt@gmail.com> Link: https://patch.msgid.link/20261031072208.3096100-2-thnkslprpt@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions