]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg
authorChristoffer Dall <cdall@linaro.org>
Wed, 2 Aug 2017 14:28:42 +0000 (16:28 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Thu, 3 Aug 2017 14:47:36 +0000 (15:47 +0100)
commit00cce9d83cbd46117841cb1284b6423567f31e5e
tree91a2fbd1caccec08f58272dc19037bc98318442b
parenta971c77a0b47531a9303474d78e748c5428ce317
KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg

There is a small chance that the compiler could generate separate loads
for the dist->propbaser which could be modified from another CPU.  As we
want to make sure we atomically update the entire value, and don't race
with other updates, guarantee that the cmpxchg operation compares
against the original value.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
virt/kvm/arm/vgic/vgic-mmio-v3.c