OSDN Git Service

KVM: x86: clear bus pointer when destroyed
authorPeter Xu <peterx@redhat.com>
Wed, 15 Mar 2017 08:01:17 +0000 (16:01 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 07:30:34 +0000 (09:30 +0200)
commitef46a13b9c4e49db8aeb319ced36f2c6d34e6bad
treed2f28ec7bd5a6a08c682f03f444d001379c44715
parent5289f1ce39a798e46f31db8efc2e3f99eebf73df
KVM: x86: clear bus pointer when destroyed

commit df630b8c1e851b5e265dc2ca9c87222e342c093b upstream.

When releasing the bus, let's clear the bus pointers to mark it out. If
any further device unregister happens on this bus, we know that we're
done if we found the bus being released already.

Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
virt/kvm/kvm_main.c