Skip to content

Commit 41726c9

Browse files
committed
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: 071698e ("io_uring: allow registering credentials") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 193155c commit 41726c9

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

fs/io_uring.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6339,6 +6339,7 @@ static void io_ring_ctx_free(struct io_ring_ctx *ctx)
63396339
io_sqe_buffer_unregister(ctx);
63406340
io_sqe_files_unregister(ctx);
63416341
io_eventfd_unregister(ctx);
6342+
idr_destroy(&ctx->personality_idr);
63426343

63436344
#if defined(CONFIG_UNIX)
63446345
if (ctx->ring_sock) {

0 commit comments

Comments
 (0)