linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>,
	axboe@kernel.dk, linux-block@vger.kernel.org
Subject: Re: [PATCH] blk-cgroup: delay calling blkcg_exit_disk until disk_release
Date: Wed, 8 Feb 2023 16:12:31 +0100	[thread overview]
Message-ID: <20230208151231.GA16018@lst.de> (raw)
In-Reply-To: <Y+NRgI+99Gz33BvQ@T590>

On Wed, Feb 08, 2023 at 03:38:40PM +0800, Ming Lei wrote:
> > This now can cause a case where disk_release is called on a disk
> > that hasn't been added.  That's mostly harmless, except for a case
> > in blk_throttl_exit that now needs to check for a NULL ->td pointer.
> 
> With this way, blkcg_init_disk() could be called before q->root_blkg
> is released in disk unbind & rebind use case, then memory leak?

q->root_blkg is now disk->root_blkg.  So in an unind and rebind case
a different disk will be involved.


  reply	other threads:[~2023-02-08 15:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08  6:35 [PATCH] blk-cgroup: delay calling blkcg_exit_disk until disk_release Christoph Hellwig
2023-02-08  7:38 ` Ming Lei
2023-02-08 15:12   ` Christoph Hellwig [this message]
2023-02-08 23:47     ` Ming Lei
2023-02-09  5:04       ` Christoph Hellwig
2023-02-09  8:56         ` Ming Lei
2023-02-09 15:12 ` Jens Axboe
2023-02-10  5:05 ` Ming Lei
2023-02-13  8:37   ` Ming Lei
2023-02-13  8:42     ` Christoph Hellwig

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=20230208151231.GA16018@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    /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;
as well as URLs for NNTP newsgroup(s).