]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/rw: free potentially allocated iovec on cache put failure
authorJens Axboe <axboe@kernel.dk>
Mon, 19 Jan 2026 02:48:01 +0000 (19:48 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Jan 2026 13:59:06 +0000 (06:59 -0700)
commit4b9748055457ac3a0710bf210c229d01ea1b01b9
tree899350e47295b5daa4ef3ef5750105047ac1dbec
parentda579f05ef0faada3559e7faddf761c75cdf85e1
io_uring/rw: free potentially allocated iovec on cache put failure

If a read/write request goes through io_req_rw_cleanup() and has an
allocated iovec attached and fails to put to the rw_cache, then it may
end up with an unaccounted iovec pointer. Have io_rw_recycle() return
whether it recycled the request or not, and use that to gauge whether to
free a potential iovec or not.

Reviewed-by: Nitesh Shetty <nj.shetty@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rw.c