Re: [PATCH] io_uring/rw: Free iovec before cleaning async data

From: Jens Axboe
Date: Thu May 30 2024 - 10:39:31 EST



On Thu, 30 May 2024 07:23:39 -0700, Breno Leitao wrote:
> kmemleak shows that there is a memory leak in io_uring read operation,
> where a buffer is allocated at iovec import, but never de-allocated.
>
> The memory is allocated at io_async_rw->free_iovec, but, then
> io_async_rw is kfreed, taking the allocated memory with it. I saw this
> happening when the read operation fails with -11 (EAGAIN).
>
> [...]

Applied, thanks!

[1/1] io_uring/rw: Free iovec before cleaning async data
commit: e112311615a24e1618a591c73506571dc304eb8d

Best regards,
--
Jens Axboe