Skip to content

Commit 13bba09

Browse files
committed
KVM: arm64: vgic-v3: Indicate vgic_put_irq() may take LPI xarray lock
The release path on LPIs is quite rare, meaning it can be difficult to find lock ordering bugs on the LPI xarray's spinlock. Tell lockdep that vgic_put_irq() might acquire the xa_lock to make unsafe patterns more obvious. Reviewed-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 982f31b commit 13bba09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/arm64/kvm/vgic/vgic.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ void vgic_put_irq(struct kvm *kvm, struct vgic_irq *irq)
142142
{
143143
struct vgic_dist *dist = &kvm->arch.vgic;
144144

145+
if (irq->intid >= VGIC_MIN_LPI)
146+
might_lock(&dist->lpi_xa.xa_lock);
147+
145148
if (!__vgic_put_irq(kvm, irq))
146149
return;
147150

0 commit comments

Comments
 (0)