KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init()
authorReiji Watanabe <reijiw@google.com>
Wed, 19 Apr 2023 02:18:51 +0000 (19:18 -0700)
committerMarc Zyngier <maz@kernel.org>
Thu, 20 Apr 2023 08:06:02 +0000 (09:06 +0100)
commit4ff910be01c0ca28c2ea8b354dd47a3a17524489
tree7dde91e8bf0df5d8fb42328057389edc145fda6c
parent49e5d16b6fc003407a33a9961b4bcbb970bd1c76
KVM: arm64: Acquire mp_state_lock in kvm_arch_vcpu_ioctl_vcpu_init()

kvm_arch_vcpu_ioctl_vcpu_init() doesn't acquire mp_state_lock
when setting the mp_state to KVM_MP_STATE_RUNNABLE. Fix the
code to acquire the lock.

Signed-off-by: Reiji Watanabe <reijiw@google.com>
[maz: minor refactor]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230419021852.2981107-2-reijiw@google.com
arch/arm64/kvm/arm.c