From: Jens Axboe Date: Wed, 7 Aug 2024 21:08:17 +0000 (-0600) Subject: io_uring/net: ensure expanded bundle send gets marked for cleanup X-Git-Tag: v6.10.5~83 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=006cf6583310d39b058c286f633ddf3b6888fd2e;p=thirdparty%2Fkernel%2Fstable.git io_uring/net: ensure expanded bundle send gets marked for cleanup commit 70ed519ed59da3a92c3acedeb84a30e5a66051ce upstream. 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: a05d1f625c7a ("io_uring/net: support bundles for send") Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/io_uring/net.c b/io_uring/net.c index 39dbf6cd07af2..d1d69288e2c8d 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -613,6 +613,7 @@ retry_bundle: 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; } }