Skip to content

Commit 6670175

Browse files
committed
Merge tag 'io_uring-6.16-20250630' of git://git.kernel.dk/linux
Pull io_uring fix from Jens Axboe: "Now that anonymous inodes set S_IFREG, this breaks the io_uring read/write retries for short reads/writes. As things like timerfd and eventfd are anon inodes, applications that previously did: unsigned long event_data[2]; io_uring_prep_read(sqe, evfd, event_data, sizeof(event_data), 0); and just got a short read when 1 event was posted, will now wait for the full amount before posting a completion. This caused issues for the ghostty application, making it basically unusable due to excessive buffering" * tag 'io_uring-6.16-20250630' of git://git.kernel.dk/linux: io_uring: gate REQ_F_ISREG on !S_ANON_INODE as well
2 parents 4b424a3 + 6f11adc commit 6670175

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

io_uring/io_uring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1666,11 +1666,12 @@ static void io_iopoll_req_issued(struct io_kiocb *req, unsigned int issue_flags)
16661666

16671667
io_req_flags_t io_file_get_flags(struct file *file)
16681668
{
1669+
struct inode *inode = file_inode(file);
16691670
io_req_flags_t res = 0;
16701671

16711672
BUILD_BUG_ON(REQ_F_ISREG_BIT != REQ_F_SUPPORT_NOWAIT_BIT + 1);
16721673

1673-
if (S_ISREG(file_inode(file)->i_mode))
1674+
if (S_ISREG(inode->i_mode) && !(inode->i_flags & S_ANON_INODE))
16741675
res |= REQ_F_ISREG;
16751676
if ((file->f_flags & O_NONBLOCK) || (file->f_mode & FMODE_NOWAIT))
16761677
res |= REQ_F_SUPPORT_NOWAIT;

0 commit comments

Comments
 (0)