]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
RISC-V: KVM: lock the correct mp_state during reset
authorRadim Krčmář <rkrcmar@ventanamicro.com>
Fri, 23 May 2025 10:47:28 +0000 (12:47 +0200)
committerAnup Patel <anup@brainfault.org>
Sat, 24 May 2025 16:00:47 +0000 (21:30 +0530)
commit7917be170928189fefad490d1a1237fdfa6b856f
tree8e2cffa7f11d45e13ff02cad2cd65a0c1ac781db
parent5b9db9c16f428ada473314ad1c49e55681be7a72
RISC-V: KVM: lock the correct mp_state during reset

Currently, the kvm_riscv_vcpu_sbi_system_reset() function locks
vcpu->arch.mp_state_lock when updating tmp->arch.mp_state.mp_state
which is incorrect hence fix it.

Fixes: 2121cadec45a ("RISCV: KVM: Introduce mp_state_lock to avoid lock inversion")
Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20250523104725.2894546-4-rkrcmar@ventanamicro.com
Signed-off-by: Anup Patel <anup@brainfault.org>
arch/riscv/kvm/vcpu_sbi.c