Skip to content

Commit 8a9c6c4

Browse files
committed
Merge tag 'io_uring-6.10-20240703' of git://git.kernel.dk/linux
Pull io_uring fix from Jens Axboe: "A fix for a feature that went into the 6.10 merge window actually ended up causing a regression in building bundles for receives. Fix that up by ensuring we don't overwrite msg_inq before we use it in the loop" * tag 'io_uring-6.10-20240703' of git://git.kernel.dk/linux: io_uring/net: don't clear msg_inq before io_recv_buf_select() needs it
2 parents 4a0929b + 6e92c64 commit 8a9c6c4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

io_uring/net.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,16 +1127,18 @@ int io_recv(struct io_kiocb *req, unsigned int issue_flags)
11271127
flags |= MSG_DONTWAIT;
11281128

11291129
retry_multishot:
1130-
kmsg->msg.msg_inq = -1;
1131-
kmsg->msg.msg_flags = 0;
1132-
11331130
if (io_do_buffer_select(req)) {
11341131
ret = io_recv_buf_select(req, kmsg, &len, issue_flags);
1135-
if (unlikely(ret))
1132+
if (unlikely(ret)) {
1133+
kmsg->msg.msg_inq = -1;
11361134
goto out_free;
1135+
}
11371136
sr->buf = NULL;
11381137
}
11391138

1139+
kmsg->msg.msg_flags = 0;
1140+
kmsg->msg.msg_inq = -1;
1141+
11401142
if (flags & MSG_WAITALL)
11411143
min_ret = iov_iter_count(&kmsg->msg.msg_iter);
11421144

0 commit comments

Comments
 (0)