aboutsummaryrefslogtreecommitdiffstats
path: root/fs/io_uring.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-02-23 13:11:42 -0700
committerJens Axboe <axboe@kernel.dk>2020-02-24 08:31:51 -0700
commit41726c9a50e7464beca7112d0aebf3a0090c62d2 (patch)
tree04dae6cd27b690b0e2f056b7bf858c26c791dd59 /fs/io_uring.c
parentio_uring: handle multiple personalities in link chains (diff)
downloadlinux-dev-41726c9a50e7464beca7112d0aebf3a0090c62d2.tar.xz
linux-dev-41726c9a50e7464beca7112d0aebf3a0090c62d2.zip
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: 071698e13ac6 ("io_uring: allow registering credentials") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to '')
-rw-r--r--fs/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7d0be264527d..d961945cb332 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6339,6 +6339,7 @@ static void io_ring_ctx_free(struct io_ring_ctx *ctx)
io_sqe_buffer_unregister(ctx);
io_sqe_files_unregister(ctx);
io_eventfd_unregister(ctx);
+ idr_destroy(&ctx->personality_idr);
#if defined(CONFIG_UNIX)
if (ctx->ring_sock) {