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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190131182334.GA3847@andrea>
Date:   Thu, 31 Jan 2019 19:23:34 +0100
From:   Andrea Parri <andrea.parri@...rulasolutions.com>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: Add missing memory barriers in afs_manage_cell()

On Thu, Jan 17, 2019 at 04:31:32PM +0100, Andrea Parri wrote:
> On Mon, Nov 26, 2018 at 05:44:12PM +0100, Andrea Parri wrote:
> > As the comments for wake_up_bit() and waitqueue_active() point out,
> > the barriers are needed to order the clearing of the _FL_NOT_READY
> > bit and the waitqueue_active() load; match the implicit barrier in
> > prepare_to_wait().
> > 
> > Signed-off-by: Andrea Parri <andrea.parri@...rulasolutions.com>
> 
> Hi David, do you have any feedback on this?

ping


> 
>   Andrea
> 
> 
> > ---
> >  fs/afs/cell.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/fs/afs/cell.c b/fs/afs/cell.c
> > index cf445dbd5f2e0..a9488abe56029 100644
> > --- a/fs/afs/cell.c
> > +++ b/fs/afs/cell.c
> > @@ -637,6 +637,7 @@ static void afs_manage_cell(struct work_struct *work)
> >  		cell->state = AFS_CELL_ACTIVE;
> >  		smp_wmb();
> >  		clear_bit(AFS_CELL_FL_NOT_READY, &cell->flags);
> > +		smp_mb__after_atomic(); /* see comment for wake_up_bit() */
> >  		wake_up_bit(&cell->flags, AFS_CELL_FL_NOT_READY);
> >  		goto again;
> >  
> > @@ -678,6 +679,7 @@ static void afs_manage_cell(struct work_struct *work)
> >  	cell->state = AFS_CELL_ACTIVE;
> >  	smp_wmb();
> >  	clear_bit(AFS_CELL_FL_NOT_READY, &cell->flags);
> > +	smp_mb__after_atomic(); /* see comment for wake_up_bit() */
> >  	wake_up_bit(&cell->flags, AFS_CELL_FL_NOT_READY);
> >  	_leave(" [deact->act]");
> >  	return;
> > -- 
> > 2.17.1
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ