aboutsummaryrefslogtreecommitdiffstats
path: root/lib/crypto/mpi/mpicoder.c
diff options
context:
space:
mode:
authorJens Axboe <[email protected]>2025-06-29 22:48:28 +0000
committerJens Axboe <[email protected]>2025-06-29 22:52:34 +0000
commit6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3 (patch)
tree1dfcb33ca71b01e064cbb3728ef0fb8bf8d67528 /lib/crypto/mpi/mpicoder.c
parentio_uring/kbuf: flag partial buffer mappings (diff)
downloadkernel-6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3.tar.gz
kernel-6f11adcc6f36ffd8f33dbdf5f5ce073368975bc3.zip
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 <[email protected]> Cc: [email protected] Link: https://github.com/ghostty-org/ghostty/discussions/7720 Fixes: cfd86ef7e8e7 ("anon_inode: use a proper mode internally") Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/crypto/mpi/mpicoder.c')
0 files changed, 0 insertions, 0 deletions