linux/io_uring/rw.c
Jens Axboe 1d5f2329ab io_uring/rw: free potentially allocated iovec on cache put failure
[ Upstream commit 4b97480554 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-02-11 13:41:52 +01:00

1412 lines
36 KiB