summaryrefslogtreecommitdiff
path: root/fs/proc
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2018-01-31 12:12:20 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-30 07:50:25 +0200
commit0675ec13c63f9eb918342b63614738767ef079a3 (patch)
tree9d40f1365c9f80ea223c352576eb45d848d1963d /fs/proc
parenta0138dc31d07220a07adbf065bb8fee023a02f40 (diff)
arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics
[ 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 whether the next ticket return by the cmpxchg is equal to the owner ticket in our updated lock word. This patch fixes the issue by performing a full 32-bit check of the lock word when trying to determine whether or not the CASA instruction updated memory. Reported-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc')
0 files changed, 0 insertions, 0 deletions