• Radim Krčmář's avatar
    KVM: x86: take slots_lock in kvm_free_pit · fb530729
    Radim Krčmář authored
    kvm_vm_release() did not have slots_lock when calling
    kvm_io_bus_unregister_dev() and this went unnoticed until 4a12f951
    ("KVM: mark kvm->busses as rcu protected") added dynamic checks.
    Luckily, there should be no race at that point:
      WARNING: suspicious RCU usage
      4.12.0.kvm+ #0 Not tainted
      ./include/linux/kvm_host.h:479 suspicious rcu_dereference_check() usage!
       kvm_io_bus_unregister_dev+0x173/0x190 [kvm]
       kvm_free_pit+0x28/0x80 [kvm]
       kvm_arch_sync_events+0x2d/0x30 [kvm]
       kvm_put_kvm+0xa7/0x2a0 [kvm]
       kvm_vm_release+0x21/0x30 [kvm]
    Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
    Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
i8254.c 18.1 KB