linux/arch/arm64/include
Will Deacon 3a5facd09d arm64: spinlock: fix spin_unlock_wait for LSE atomics
Commit d86b8da04d ("arm64: spinlock: serialise spin_unlock_wait against
concurrent lockers") fixed spin_unlock_wait for LL/SC-based atomics under
the premise that the LSE atomics (in particular, the LDADDA instruction)
are indivisible.

Unfortunately, these instructions are only indivisible when used with the
-AL (full ordering) suffix and, consequently, the same issue can
theoretically be observed with LSE atomics, where a later (in program
order) load can be speculated before the write portion of the atomic
operation.

This patch fixes the issue by performing a CAS of the lock once we've
established that it's unlocked, in much the same way as the LL/SC code.

Fixes: d86b8da04d ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers")
Signed-off-by: Will Deacon <will.deacon@arm.com>
2016-06-15 09:51:36 +01:00
..
asm arm64: spinlock: fix spin_unlock_wait for LSE atomics 2016-06-15 09:51:36 +01:00
uapi/asm asm-generic: Drop renameat syscall from default list 2016-05-05 00:42:21 +02:00