From: Ming Lei <ming.lei@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: 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 23:31:15 +0800 [thread overview]
Message-ID: <aWEfQ148Qu0axKfp@fedora> (raw)
In-Reply-To: <aWEaOFuhRPvtnkRO@infradead.org>
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.
Thanks,
Ming
next prev parent reply other threads:[~2026-01-09 15:31 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 [this message]
2026-01-09 15:33 ` 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=aWEfQ148Qu0axKfp@fedora \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox