diff options
author | Wojciech Lukowicz <[email protected]> | 2023-04-01 20:50:39 +0100 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-04-01 16:52:12 -0600 |
commit | b4a72c0589fdea6259720375426179888969d6a2 (patch) | |
tree | ada64f1c07c40c8b248bb1807d6af15db18fc18f /lib/mpi/mpi-bit.c | |
parent | c0921e51dab767ef5adf6175c4a0ba3c6e1074a3 (diff) |
io_uring: fix memory leak when removing provided buffers
When removing provided buffers, io_buffer structs are not being disposed
of, leading to a memory leak. They can't be freed individually, because
they are allocated in page-sized groups. They need to be added to some
free list instead, such as io_buffers_cache. All callers already hold
the lock protecting it, apart from when destroying buffers, so had to
extend the lock there.
Fixes: cc3cec8367cb ("io_uring: speedup provided buffer handling")
Signed-off-by: Wojciech Lukowicz <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-bit.c')
0 files changed, 0 insertions, 0 deletions