UPSTREAM: 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.

BUG=chromium:846515
TEST=build/boot on hana with USE=kvm_host

Change-Id: I4ed6cd4b794a6a9c31f12278f0268d128a504e0e
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Radim Krm <rkrcmar@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit c6216a0f1e3da39f37aba3d43257c8cda172b414
 in https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/)
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1088102
1 file changed