]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: arm/arm64: Properly protect VGIC locks from IRQs
authorAndre Przywara <andre.przywara@arm.com>
Fri, 11 May 2018 14:20:12 +0000 (15:20 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 May 2018 11:36:27 +0000 (13:36 +0200)
commit388d4359680b56dba82fe2ffca05871e9fd2b73e
tree547fce672af5345a2a080958dfff6f791cb6fd72
parent4c27625b7a67eb9006963ed2bcf8e53b259b43af
KVM: arm/arm64: Properly protect VGIC locks from IRQs

As Jan reported [1], lockdep complains about the VGIC not being bullet
proof. This seems to be due to two issues:
- When commit 006df0f34930 ("KVM: arm/arm64: Support calling
  vgic_update_irq_pending from irq context") promoted irq_lock and
  ap_list_lock to _irqsave, we forgot two instances of irq_lock.
  lockdeps seems to pick those up.
- If a lock is _irqsave, any other locks we take inside them should be
  _irqsafe as well. So the lpi_list_lock needs to be promoted also.

This fixes both issues by simply making the remaining instances of those
locks _irqsave.
One irq_lock is addressed in a separate patch, to simplify backporting.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2018-May/575718.html

Cc: stable@vger.kernel.org
Fixes: 006df0f34930 ("KVM: arm/arm64: Support calling vgic_update_irq_pending from irq context")
Reported-by: Jan Glauber <jan.glauber@caviumnetworks.com>
Acked-by: Christoffer Dall <christoffer.dall@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/arm/vgic/vgic-debug.c
virt/kvm/arm/vgic/vgic-its.c
virt/kvm/arm/vgic/vgic.c