diff options
author | Jens Axboe <axboe@kernel.dk> | 2025-06-30 01:48:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-07-06 12:04:25 +0300 |
commit | 3ff0a89be94465f6ccde2130277c9736241a2891 (patch) | |
tree | 8e0123e9eee1e2015599e1541c8f28bcd90253bf /scripts/gdb/linux/xarray.py | |
parent | c7d15ba11c8561c5f325ffeb27ed8a4e82d4d322 (diff) | |
download | linux-3ff0a89be94465f6ccde2130277c9736241a2891.tar.xz |
io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well
commit 6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3 upstream.
io_uring marks a request as dealing with a regular file on S_ISREG. This
drives things like retries on short reads or writes, which is generally
not expected on a regular file (or bdev). Applications tend to not
expect that, so io_uring tries hard to ensure it doesn't deliver short
IO on regular files.
However, a recent commit added S_IFREG to anonymous inodes. When
io_uring is used to read from various things that are backed by anon
inodes, like eventfd, timerfd, etc, then it'll now all of a sudden wait
for more data when rather than deliver what was read or written in a
single operation. This breaks applications that issue reads on anon
inodes, if they ask for more data than a single read delivers.
Add a check for !S_ANON_INODE as well before setting REQ_F_ISREG to
prevent that.
Cc: Christian Brauner <brauner@kernel.org>
Cc: stable@vger.kernel.org
Link: https://github.com/ghostty-org/ghostty/discussions/7720
Fixes: cfd86ef7e8e7 ("anon_inode: use a proper mode internally")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gdb/linux/xarray.py')
0 files changed, 0 insertions, 0 deletions