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] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 19 May 2016 18:19:17 -0700
From:	Davidlohr Bueso <dave@...olabs.net>
To:	Jason Low <jason.low2@....com>
Cc:	Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Waiman Long <waiman.long@....com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Terry Rudd <terry.rudd@....com>,
	Scott J Norton <scott.norton@....com>,
	Jason Low <jason.low2@...com>
Subject: Re: [PATCH] locking/mutex: Set and clear owner using WRITE_ONCE()

On Thu, 19 May 2016, Jason Low wrote:

>The mutex owner can get read and written to without the wait_lock.
>Use WRITE_ONCE when setting and clearing the owner field in order
>to avoid optimizations such as store tearing. This avoids
>situations where the owner field gets written to with multiple
>stores and another thread could concurrently read and use a
>partially written owner value.

Right, I also ran into this with rtmutexes when avoiding the schedule()
and the spin on owner thingie.

>Signed-off-by: Jason Low <jason.low2@....com>

Acked-by: Davidlohr Bueso <dave@...olabs.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ