]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
KVM: arm64: vgic: fix incorrect spinlock API usage
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Mon, 8 Sep 2025 18:04:11 +0000 (11:04 -0700)
committerOliver Upton <oliver.upton@linux.dev>
Wed, 10 Sep 2025 09:56:20 +0000 (02:56 -0700)
The function vgic_flush_lr_state() is calling _raw_spin_unlock()
instead of the proper raw_spin_unlock().

_raw_spin_unlock() is an internal low-level API and should not
be used directly; using raw_spin_unlock() ensures proper locking
semantics in the vgic code.

Fixes: 8fa3adb8c6be ("KVM: arm/arm64: vgic: Make vgic_irq->irq_lock a raw_spinlock")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Message-ID: <20250908180413.3655546-1-alok.a.tiwari@oracle.com>
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/vgic/vgic.c

index 3b247041a1300c842a109da4ecec3f398c2cc459..6dd5a10081e27e72989c798feaabe191c8a55d6f 100644 (file)
@@ -854,7 +854,7 @@ static void vgic_flush_lr_state(struct kvm_vcpu *vcpu)
                 * the AP list has been sorted already.
                 */
                if (multi_sgi && irq->priority > prio) {
-                       _raw_spin_unlock(&irq->irq_lock);
+                       raw_spin_unlock(&irq->irq_lock);
                        break;
                }