KVM: x86: flush pending lapic jump label updates on module unload

commit cef84c302f upstream.

KVM's lapic emulation uses static_key_deferred (apic_{hw,sw}_disabled).
These are implemented with delayed_work structs which can still be
pending when the KVM module is unloaded. We've seen this cause kernel
panics when the kvm_intel module is quickly reloaded.

Use the new static_key_deferred_flush() API to flush pending updates on
module unload.

Signed-off-by: David Matlack <dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
David Matlack 2016-12-16 14:30:36 -08:00 • committed by Ben Hutchings
commit e150dfb5e5
3 changed files with 8 additions and 0 deletions