public inbox for [email protected]
 help / color / mirror / Atom feed
From: Stefano Garzarella <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH] io_uring: fix personality idr leak
Date: Mon, 24 Feb 2020 11:16:14 +0100	[thread overview]
Message-ID: <20200224101614.rycnfdvcrhthlkct@steredhat> (raw)
In-Reply-To: <[email protected]>

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 <[email protected]>
> 
> ---

Reviewed-by: Stefano Garzarella <[email protected]>

> 
> 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
> 


      reply	other threads:[~2020-02-24 10:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-23 21:17 [PATCH] io_uring: fix personality idr leak Jens Axboe
2020-02-24 10:16 ` Stefano Garzarella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200224101614.rycnfdvcrhthlkct@steredhat \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox