summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorPaolo Bonzini2017-03-27 17:53:50 +0200
committerPaolo Bonzini2017-03-28 14:08:02 +0200
commit2beb6dad2e8f95d710159d5befb390e4f62ab5cf (patch)
treede7330624e1508cc44fd21799cc689a7038c9a86 /arch/x86/kvm/x86.c
parentKVM: nVMX: fix nested EPT detection (diff)
downloadkernel-qcow2-linux-2beb6dad2e8f95d710159d5befb390e4f62ab5cf.tar.gz
kernel-qcow2-linux-2beb6dad2e8f95d710159d5befb390e4f62ab5cf.tar.xz
kernel-qcow2-linux-2beb6dad2e8f95d710159d5befb390e4f62ab5cf.zip
KVM: x86: cleanup the page tracking SRCU instance
SRCU uses a delayed work item. Skip cleaning it up, and the result is use-after-free in the work item callbacks. Reported-by: Dmitry Vyukov <dvyukov@google.com> Suggested-by: Dmitry Vyukov <dvyukov@google.com> Cc: stable@vger.kernel.org Fixes: 0eb05bf290cfe8610d9680b49abef37febd1c38a Reviewed-by: Xiao Guangrong <xiaoguangrong.eric@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 64697fe475c3..ccbd45ecd41a 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8158,6 +8158,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
kvm_free_vcpus(kvm);
kvfree(rcu_dereference_check(kvm->arch.apic_map, 1));
kvm_mmu_uninit_vm(kvm);
+ kvm_page_track_cleanup(kvm);
}
void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *free,