Re: [PATCH] io_uring: fix personality idr leak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 23, 2020 at 02:17:36PM -0700, Jens Axboe wrote:
> 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")
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> 
> ---

Reviewed-by: Stefano Garzarella <sgarzare@xxxxxxxxxx>

> 
> 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) {
> 
> -- 
> Jens Axboe
> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux