Skip to content
Commit 725f4966 authored by Oliver Upton's avatar Oliver Upton Committed by Dom Cobley
Browse files

KVM: arm64: Fix read-side race on updates to vcpu reset state



[ Upstream commit 6654f9df ]

KVM correctly serializes writes to a vCPU's reset state, however since
we do not take the KVM lock on the read side it is entirely possible to
read state from two different reset requests.

Cure the race for now by taking the KVM lock when reading the
reset_state structure.

Fixes: 358b28f0 ("arm/arm64: KVM: Allow a VCPU to fully reset itself")
Signed-off-by: default avatarOliver Upton <oupton@google.com>
Signed-off-by: default avatarMarc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210818202133.1106786-2-oupton@google.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 691ddcf2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment