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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1489783004.2826.13.camel@sandisk.com>
Date:   Fri, 17 Mar 2017 20:36:58 +0000
From:   Bart Van Assche <Bart.VanAssche@...disk.com>
To:     "tom.leiming@...il.com" <tom.leiming@...il.com>
CC:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "hch@...radead.org" <hch@...radead.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "yizhan@...hat.com" <yizhan@...hat.com>,
        "axboe@...com" <axboe@...com>, "tj@...nel.org" <tj@...nel.org>
Subject: Re: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting
 dying

On Sat, 2017-03-18 at 02:32 +0800, Ming Lei wrote:
> On Sat, Mar 18, 2017 at 1:32 AM, Bart Van Assche wrote:
> > +       /*
> > +        * Avoid that the updates of the queue flags and q_usage_counter
> > +        * are reordered.
> > +        */
> > +       smp_wmb();
> 
> atomic_inc_return() in blk_mq_freeze_queue_start() does imply a
> barrier(smp_mb()).

Hello Ming,

It's probably a good idea to mention that in a comment. The implementation
of blk_mq_freeze_queue_start() namely could be changed in the future such
that it uses another atomic operation that doesn't implicitly perform smp_mb().

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ