android_kernel_oneplus_msm8998/arch/arm64
Will Deacon 07b1d60d79 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>
2018-05-30 07:48:56 +02:00
..
boot arm64: dts: add #cooling-cells to CPU nodes 2018-02-25 11:03:37 +01:00
configs arm64 fixes and clean-ups: 2015-11-12 15:33:11 -08:00
crypto crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes 2017-02-09 08:02:45 +01:00
include arm64: spinlock: Fix theoretical trylock() A-B-A with LSE atomics 2018-05-30 07:48:56 +02:00
kernel arm64: Disable unhandled signal log messages by default 2018-02-28 10:17:23 +01:00
kvm arm64: KVM: Fix SMCCC handling of unimplemented SMC/HVC calls 2018-01-23 19:50:17 +01:00
lib arm64: add KASAN support 2015-10-12 17:46:36 +01:00
mm arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-26 08:48:49 +02:00
net bpf, arm64: fix jit branch offset related to ldimm64 2017-05-14 13:32:58 +02:00
xen arm: xen: implement multicall hypercall support. 2014-04-24 13:09:46 +01:00
Kconfig arm64: Add work around for Arm Cortex-A55 Erratum 1024718 2018-05-26 08:48:49 +02:00
Kconfig.debug arm64: remove redundant FRAME_POINTER kconfig option and force to select it 2015-11-10 10:36:00 +00:00
Kconfig.platforms ARM: tegra: select USB_ULPI from EHCI rather than platform 2018-02-25 11:03:51 +01:00
Makefile arm64: errata: Add -mpc-relative-literal-loads to build flags 2016-03-03 15:07:08 -08:00