All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org,
	Caleb Sander Mateos <csander@purestorage.com>,
	Uday Shankar <ushankar@purestorage.com>,
	Ruikai Peng <ruikai@pwno.io>
Subject: Re: [PATCH] ublk: fix use-after-free in ublk_partition_scan_work
Date: Fri, 9 Jan 2026 07:33:44 -0800	[thread overview]
Message-ID: <aWEf2M2msafGR_4k@infradead.org> (raw)
In-Reply-To: <aWEfQ148Qu0axKfp@fedora>

On Fri, Jan 09, 2026 at 11:31:15PM +0800, Ming Lei wrote:
> On Fri, Jan 09, 2026 at 07:09:44AM -0800, Christoph Hellwig wrote:
> > Why does ublk have it's own partition scan code anyway?
> 
> It is for improving error handling and avoiding deadlock.
> 
> ub->mutex is held when calling add_disk(), when IO error or timeout is
> triggered, error handling code path requires ub->mutex.
> 
> So it takes nvme mpath's approach to scan partition from wq context.

Ok.  I have to say I hate both instance of it, we really need to find
a way to do better than that :(


      reply	other threads:[~2026-01-09 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 12:14 [PATCH] ublk: fix use-after-free in ublk_partition_scan_work Ming Lei
2026-01-09 13:57 ` Jens Axboe
2026-01-09 15:09 ` Christoph Hellwig
2026-01-09 15:31   ` Ming Lei
2026-01-09 15:33     ` Christoph Hellwig [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=aWEf2M2msafGR_4k@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=linux-block@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=ruikai@pwno.io \
    --cc=ushankar@purestorage.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.