[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180605150834.zed7tjvmm7livrbe@twin.jikos.cz>
Date: Tue, 5 Jun 2018 17:08:34 +0200
From: David Sterba <dsterba@...e.cz>
To: dsterba@...e.cz, Jens Axboe <axboe@...nel.dk>,
Kent Overstreet <kent.overstreet@...il.com>,
torvalds@...ux-foundation.org, snitzer@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dm: Use kzalloc for all structs with embedded
biosets/mempools
On Tue, Jun 05, 2018 at 04:35:07PM +0200, David Sterba wrote:
> On Tue, Jun 05, 2018 at 08:22:22AM -0600, Jens Axboe wrote:
> > > I fucked up majorly on the bioset/mempool conversion - I forgot to check that
> > > everything biosets/mempools were being embedded in was actually being zeroed on
> > > allocation. Device mapper currently explodes, you'll probably want to apply this
> > > patch post haste.
> > >
> > > I have now done that auditing, for every single conversion - this patch fixes
> > > everything I found. There do not seem to be any incorrect ones outside of device
> > > mapper...
> > >
> > > We'll probably want a second patch that either a) changes
> > > bioset_init()/mempool_init() to zero the passed in bioset/mempool first, or b)
> > > my preference, WARN() or BUG() if they're passed memory that isn't zeroed.
> >
> > Odd, haven't seen a crash, but probably requires kasan or poisoning to
> > trigger anything? Mike's tree also had the changes, since they were based
> > on the block tree.
>
> eg. fstests/generic/081 crashes (trace below), no KASAN, PAGE_POISONING=y,
> PAGE_POISONING_NO_SANITY=y.
>
> > I can queue this up and ship it later today. Mike, you want to review
> > this one?
>
> Would be great to push that soon. The fstests build on several DM targets, the
> crashes lead to many test failures. I'm going to test the kzalloc fix now.
Tested-by: David Sterba <dsterba@...e.com>
on targets snapshot and thin.
Powered by blists - more mailing lists