Skip to content

Commit

Permalink
io_uring/net: ensure expanded bundle recv gets marked for cleanup
Browse files Browse the repository at this point in the history
If the iovec inside the kmsg isn't already allocated AND one gets
expanded beyond the fixed size, then the request may not already have
been marked for cleanup. Ensure that it is.

Cc: stable@vger.kernel.org
Fixes: 2f9c951 ("io_uring/net: support bundles for recv")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
axboe committed Aug 7, 2024
1 parent c3fca4f commit 11893e1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
if (arg.iovs != &kmsg->fast_iov && arg.iovs != kmsg->free_iov) {
kmsg->free_iov_nr = ret;
kmsg->free_iov = arg.iovs;
req->flags |= REQ_F_NEED_CLEANUP;
}
} else {
void __user *buf;
Expand Down

0 comments on commit 11893e1

Please sign in to comment.