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:53:31 +0000 (09:53 +0200)
commit3eb392056aeb4a0beca5fcead9ad3d6b6ff0816e
tree414b05cac0663e735ba4fdbf9406e911e3099581
parenteac3ab3e69151c21a0a71ec8711600022cc12fa3
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