Skip to content

Commit

Permalink
Merge tag 'io_uring-6.10-20240703' of git://git.kernel.dk/linux
Browse files Browse the repository at this point in the history
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
  • Loading branch information
torvalds committed Jul 3, 2024
2 parents 4a0929b + 6e92c64 commit 8a9c6c4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,16 +1127,18 @@ int io_recv(struct io_kiocb *req, unsigned int issue_flags)
flags |= MSG_DONTWAIT;

retry_multishot:
kmsg->msg.msg_inq = -1;
kmsg->msg.msg_flags = 0;

if (io_do_buffer_select(req)) {
ret = io_recv_buf_select(req, kmsg, &len, issue_flags);
if (unlikely(ret))
if (unlikely(ret)) {
kmsg->msg.msg_inq = -1;
goto out_free;
}
sr->buf = NULL;
}

kmsg->msg.msg_flags = 0;
kmsg->msg.msg_inq = -1;

if (flags & MSG_WAITALL)
min_ret = iov_iter_count(&kmsg->msg.msg_iter);

Expand Down

0 comments on commit 8a9c6c4

Please sign in to comment.