[PATCH AUTOSEL for 4.15 156/189] arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics

2018-04-08 Thread Sasha Levin
From: Will Deacon [ Upstream commit 202fb4ef81e3ec765c23bd1e6746a5c25b797d0e ] If the spinlock "next" ticket wraps around between the initial LDR and the cmpxchg in the LSE version of spin_trylock, then we can erroneously think that we have successfuly acquired the lock

[PATCH AUTOSEL for 4.15 156/189] arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics

2018-04-08 Thread Sasha Levin
From: Will Deacon [ Upstream commit 202fb4ef81e3ec765c23bd1e6746a5c25b797d0e ] If the spinlock "next" ticket wraps around between the initial LDR and the cmpxchg in the LSE version of spin_trylock, then we can erroneously think that we have successfuly acquired the lock because we only check