Skip to content

Commit 6bef365

Browse files
Marc Zyngieroupton
authored andcommitted
KVM: arm64: vgic: Ensure that slots_lock is held in vgic_register_all_redist_iodevs()
Although we implicitly depend on slots_lock being held when registering IO devices with the IO bus infrastructure, we don't enforce this requirement. Make it explicit. Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 02e3858 commit 6bef365

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/arm64/kvm/vgic/vgic-mmio-v3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,8 @@ static int vgic_register_all_redist_iodevs(struct kvm *kvm)
833833
unsigned long c;
834834
int ret = 0;
835835

836+
lockdep_assert_held(&kvm->slots_lock);
837+
836838
kvm_for_each_vcpu(c, vcpu, kvm) {
837839
ret = vgic_register_redist_iodev(vcpu);
838840
if (ret)

0 commit comments

Comments
 (0)