]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
KVM: x86: flush pending lapic jump label updates on module unload
authorDavid Matlack <dmatlack@google.com>
Fri, 16 Dec 2016 22:30:36 +0000 (14:30 -0800)
committerLuis Henriques <luis.henriques@canonical.com>
Fri, 20 Jan 2017 15:38:49 +0000 (15:38 +0000)
commit11e1f669ef6b094c5761982bfbaa9a81feec2fbd
tree4752bbaea45b8d111e4e8981d758b8e392a848b9
parentde4d74e5980702e089bf4b60110281ce978695e4
KVM: x86: flush pending lapic jump label updates on module unload

BugLink: http://bugs.launchpad.net/bugs/1658091
commit cef84c302fe051744b983a92764d3fcca933415d 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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
arch/x86/kvm/lapic.c
arch/x86/kvm/lapic.h
arch/x86/kvm/x86.c