lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 8 Oct 2018 10:23:41 +0200
From:   Jinpu Wang <jinpu.wang@...fitbricks.com>
To:     Shaohua Li <shli@...nel.org>
Cc:     Wang Jinpu <xjtuwjp@...il.com>, NeilBrown <neilb@...e.com>,
        linux-raid@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] md/bitmap: use mddev_suspend/resume instead of ->quiesce()

On Fri, Sep 28, 2018 at 8:30 PM Shaohua Li <shli@...nel.org> wrote:
>
> On Thu, Sep 27, 2018 at 10:07:57AM +0200, Jack Wang wrote:
> > From: Jack Wang <jinpu.wang@...fitbricks.com>
> >
> > After 9e1cc0a54556 ("md: use mddev_suspend/resume instead of ->quiesce()")
> > We still have similar left in bitmap functions.
> >
> > Replace quiesce() with mddev_suspend/resume.
> >
> > Also move md_bitmap_create out of mddev_suspend. and move mddev_resume
> > after md_bitmap_destroy. as we did in set_bitmap_file.
> >
> > Signed-off-by: Jack Wang <jinpu.wang@...fitbricks.com>
> > Reviewed-by: Gioh Kim <gi-oh.kim@...fitbricks.com>
> >
> > ---
> > v2->v1: add reviewed-by.
> > ---
> >  drivers/md/md-bitmap.c | 13 +++++++------
> >  1 file changed, 7 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c
> > index 2fc8c113977f..c369f1753ea6 100644
> > --- a/drivers/md/md-bitmap.c
> > +++ b/drivers/md/md-bitmap.c
> > @@ -2123,7 +2123,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
> >       }
> >
> >       if (!init)
> > -             bitmap->mddev->pers->quiesce(bitmap->mddev, 1);
> > +             mddev_suspend(bitmap->mddev);
>
>
> mddev_suspend is supposed to be called with reconfig_mutex hold. At least one
> place this isn't true with this change, for example, raid_preresume doesn't
> call md_bitmap_resize with the lock hold. Could you please double check the
> lock usage?
You're right, I missed this one, will double check.

Thanks for review!



-- 
Jack Wang
Linux Kernel Developer

ProfitBricks GmbH
Greifswalder Str. 207
D - 10405 Berlin

Tel:       +49 30 577 008  042
Fax:      +49 30 577 008 299
Email:    jinpu.wang@...fitbricks.com
URL:      https://www.profitbricks.de

Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 125506 B
Geschäftsführer: Achim Weiss, Matthias Steinberg, Christoph Steffens

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ