Files
erofs-linux/kernel
Peter Zijlstra 920c720aa5 locking/mcs: Fix mcs_spin_lock() ordering
Similar to commit b4b29f9485 ("locking/osq: Fix ordering of node
initialisation in osq_lock") the use of xchg_acquire() is
fundamentally broken with MCS like constructs.

Furthermore, it turns out we rely on the global transitivity of this
operation because the unlock path observes the pointer with a
READ_ONCE(), not an smp_load_acquire().

This is non-critical because the MCS code isn't actually used and
mostly serves as documentation, a stepping stone to the more complex
things we've build on top of the idea.

Reported-by: Andrea Parri <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Fixes: 3552a07a9c ("locking/mcs: Use acquire/release semantics")
Signed-off-by: Ingo Molnar <[email protected]>
2016-02-29 10:02:41 +01:00
..
2015-12-04 22:46:25 +01:00
…
2015-11-19 17:51:48 +01:00
2016-01-22 18:04:28 -05:00
2016-01-22 18:04:28 -05:00
…
2015-12-14 14:54:37 -05:00
…
…
…
…
2016-01-14 16:00:49 -08:00
…
…
2015-11-23 09:44:58 +01:00
…
…
…
2016-01-22 18:04:28 -05:00
…
…
…
…
…
…
…