mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 03:33:59 +08:00
io_uring: fix personality idr leak
We somehow never free the idr, even though we init it for every ctx.
Free it when the rest of the ring data is freed.
Fixes: 071698e13a
("io_uring: allow registering credentials")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
193155c8c9
commit
41726c9a50
@ -6339,6 +6339,7 @@ static void io_ring_ctx_free(struct io_ring_ctx *ctx)
|
|||||||
io_sqe_buffer_unregister(ctx);
|
io_sqe_buffer_unregister(ctx);
|
||||||
io_sqe_files_unregister(ctx);
|
io_sqe_files_unregister(ctx);
|
||||||
io_eventfd_unregister(ctx);
|
io_eventfd_unregister(ctx);
|
||||||
|
idr_destroy(&ctx->personality_idr);
|
||||||
|
|
||||||
#if defined(CONFIG_UNIX)
|
#if defined(CONFIG_UNIX)
|
||||||
if (ctx->ring_sock) {
|
if (ctx->ring_sock) {
|
||||||
|
Loading…
Reference in New Issue
Block a user