From: Mike Snitzer <snitzer@redhat.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Jens Axboe <axboe@kernel.dk>,
Matthew Wilcox <willy@infradead.org>,
dm-devel@redhat.com, linux-block@vger.kernel.org,
david@fromorbit.com
Subject: Re: bioset_exit poison from dm_destroy
Date: Wed, 1 Jun 2022 10:13:34 -0400 [thread overview]
Message-ID: <Ypd0DnmjvCoWj+1P@redhat.com> (raw)
In-Reply-To: <YpcBgY9MMgumEjTL@infradead.org>
On Wed, Jun 01 2022 at 2:04P -0400,
Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, May 31, 2022 at 02:58:00PM -0400, Mike Snitzer wrote:
> > Yes, we need the above to fix the crash. Does it also make sense to
> > add this?
>
> Can we just stop treating bio_sets so sloppily and make the callers
> handle their lifetime properly? No one should have to use
> bioset_initialized (or double free bio_sets).
>
Please take the time to look at the code and save your judgement until
you do. That said, I'm not in love with the complexity of how DM
handles bioset initialization. But both you and Jens keep taking
shots at DM for doing things wrong without actually looking.
DM uses bioset_init_from_src(). Yet you've both assumed double frees
and such (while not entirely wrong your glossing over the detail that
there is intervening reinitialization of DM's biosets between the
bioset_exit()s)
And it really can just be that the block code had a bug where it
didn't clear bs->cache. Doesn't need to be cause for attacks.
next prev parent reply other threads:[~2022-06-01 14:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-29 0:17 bioset_exit poison from dm_destroy Matthew Wilcox
2022-05-29 12:46 ` Jens Axboe
2022-05-31 18:58 ` Mike Snitzer
2022-05-31 19:00 ` Jens Axboe
2022-05-31 19:49 ` Mike Snitzer
2022-06-01 3:27 ` Jens Axboe
2022-06-01 6:04 ` Christoph Hellwig
2022-06-01 6:08 ` Jens Axboe
2022-06-01 6:18 ` Christoph Hellwig
2022-06-01 14:13 ` Mike Snitzer [this message]
2022-06-02 8:12 ` Christoph Hellwig
2022-06-02 8:18 ` Jens Axboe
2022-06-03 13:09 ` Mike Snitzer
2022-06-03 13:19 ` 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=Ypd0DnmjvCoWj+1P@redhat.com \
--to=snitzer@redhat.com \
--cc=axboe@kernel.dk \
--cc=david@fromorbit.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=willy@infradead.org \
/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).