diff options
author | Jens Axboe <axboe@kernel.dk> | 2025-06-29 16:48:28 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-06-29 16:52:34 -0600 |
commit | 6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3 (patch) | |
tree | 1dfcb33ca71b01e064cbb3728ef0fb8bf8d67528 /scripts/lib/kdoc/kdoc_output.py | |
parent | 178b8ff66ff827c41b4fa105e9aabb99a0b5c537 (diff) |
io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well
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>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
0 files changed, 0 insertions, 0 deletions