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: <1347810587.13258.279.camel@deadeye.wl.decadent.org.uk>
Date:	Sun, 16 Sep 2012 16:49:47 +0100
From:	Ben Hutchings <ben@...adent.org.uk>
To:	Tejun Heo <tj@...nel.org>
Cc:	Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH -stable] workqueue: UNBOUND -> REBIND morphing in
 rebind_workers() should be atomic

On Tue, 2012-09-04 at 16:58 -0700, Tejun Heo wrote:
> From: Lai Jiangshan <laijs@...fujitsu.com>
> 
> The compiler may compile the following code into TWO write/modify
> instructions.
> 
>         worker->flags &= ~WORKER_UNBOUND;
>         worker->flags |= WORKER_REBIND;
> 
> so the other CPU may temporarily see worker->flags which doesn't have
> either WORKER_UNBOUND or WORKER_REBIND set and perform local wakeup
> prematurely.
> 
> Fix it by using single explicit assignment via ACCESS_ONCE().
> 
> Because idle workers have another WORKER_NOT_RUNNING flag, this bug
> doesn't exist for them; however, update it to use the same pattern for
> consistency.
> 
> tj: Applied the change to idle workers too and updated comments and
>     patch description a bit.
> 
> stable: Idle worker rebinding doesn't apply for -stable and
>         WORKER_UNBOUND used to be WORKER_ROGUE.  Updated accordingly.
[...]

Added to the queue for 3.2, thanks.

Ben.

-- 
Ben Hutchings
Experience is what causes a person to make new mistakes instead of old ones.

Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ