Skip to content
Commit 07d6063d authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/kbuf: prune deferred locked cache when tearing down

We used to just use our page list for final teardown, which would ensure
that we got all the buffers, even the ones that were not on the normal
cached list. But while moving to slab for the io_buffers, we know only
prune this list, not the deferred locked list that we have. This can
cause a leak of memory, if the workload ends up using the intermediate
locked list.

Fix this by always pruning both lists when tearing down.

Fixes: b3a4dbc8

 ("io_uring/kbuf: Use slab for struct io_buffer objects")
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b10b73c1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment