summaryrefslogtreecommitdiffstats
path: root/io_uring/net.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-08-07 15:06:45 -0600
committerJens Axboe <axboe@kernel.dk>2024-08-07 15:06:45 -0600
commit11893e144ed75be55d99349760513ca104781fc0 (patch)
tree78e7d1ece56cb6b19aec835f9549d5b7ae27476d /io_uring/net.c
parentc3fca4fb83f7c84cd1e1aa9fe3a0e220ce8f30fb (diff)
downloadlinux-stable-11893e144ed75be55d99349760513ca104781fc0.tar.gz
linux-stable-11893e144ed75be55d99349760513ca104781fc0.tar.bz2
linux-stable-11893e144ed75be55d99349760513ca104781fc0.zip
io_uring/net: ensure expanded bundle recv gets marked for cleanup
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: 2f9c9515bdfd ("io_uring/net: support bundles for recv") Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/net.c')
-rw-r--r--io_uring/net.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/net.c b/io_uring/net.c
index 594490a1389b..97a48408cec3 100644
--- a/io_uring/net.c
+++ b/io_uring/net.c
@@ -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;