Skip to content

Commit 8d3a7df

Browse files
ouptonMarc Zyngier
authored andcommitted
KVM: arm64: vgic-its: Test for valid IRQ in its_sync_lpi_pending_table()
vgic_get_irq() may not return a valid descriptor if there is no ITS that holds a valid translation for the specified INTID. If that is the case, it is safe to silently ignore it and continue processing the LPI pending table. Cc: stable@vger.kernel.org Fixes: 33d3bc9 ("KVM: arm64: vgic-its: Read initial LPI pending table") Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Link: https://lore.kernel.org/r/20240221092732.4126848-2-oliver.upton@linux.dev Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent c60d847 commit 8d3a7df

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/arm64/kvm/vgic/vgic-its.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ static int its_sync_lpi_pending_table(struct kvm_vcpu *vcpu)
468468
}
469469

470470
irq = vgic_get_irq(vcpu->kvm, NULL, intids[i]);
471+
if (!irq)
472+
continue;
473+
471474
raw_spin_lock_irqsave(&irq->irq_lock, flags);
472475
irq->pending_latch = pendmask & (1U << bit_nr);
473476
vgic_queue_irq_unlock(vcpu->kvm, irq, flags);

0 commit comments

Comments
 (0)