]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
io_uring/net: don't clear REQ_F_NEED_CLEANUP unconditionally
authorJens Axboe <axboe@kernel.dk>
Thu, 20 Mar 2025 18:25:12 +0000 (12:25 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 28 Mar 2025 21:03:29 +0000 (22:03 +0100)
commit66e3cc3885e85153508a1066146a0b1c354fa5fc
tree8c425354f30be5c5b74c1c99d43af5ca715ac7d2
parent4b4d2527840f088a8df19027a6c208f4122a7106
io_uring/net: don't clear REQ_F_NEED_CLEANUP unconditionally

commit cc34d8330e036b6bffa88db9ea537bae6b03948f upstream.

io_req_msg_cleanup() relies on the fact that io_netmsg_recycle() will
always fully recycle, but that may not be the case if the msg cache
was already full. To ensure that normal cleanup always gets run,
let io_netmsg_recycle() deal with clearing the relevant cleanup flags,
as it knows exactly when that should be done.

Cc: stable@vger.kernel.org
Reported-by: David Wei <dw@davidwei.uk>
Fixes: 75191341785e ("io_uring/net: add iovec recycling")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
io_uring/net.c