]> git.ipfire.org Git - people/arne_f/kernel.git/commit
KVM: arm/arm64: Fix spinlock acquisition in vgic_set_owner
authorMarc Zyngier <marc.zyngier@arm.com>
Thu, 30 Nov 2017 17:00:30 +0000 (17:00 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Feb 2018 10:07:56 +0000 (11:07 +0100)
commit97ef3a5027b043bcb6a9c4aeefdcbfe4cf6221f7
tree85d8ea28a08d5b046c68c7f6ed881c5af9bfd905
parent2117bba3cfbb120dee072a11aba4a116f316dff5
KVM: arm/arm64: Fix spinlock acquisition in vgic_set_owner

[ Upstream commit 7465894e90e5a47e0e52aa5f1f708653fc40020f ]

vgic_set_owner acquires the irq lock without disabling interrupts,
resulting in a lockdep splat (an interrupt could fire and result
in the same lock being taken if the same virtual irq is to be
injected).

In practice, it is almost impossible to trigger this bug, but
better safe than sorry. Convert the lock acquisition to a
spin_lock_irqsave() and keep lockdep happy.

Reported-by: James Morse <james.morse@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/arm/vgic/vgic.c