aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2010-01-19 09:45:23 -0500
committerMarcelo Tosatti <mtosatti@redhat.com>2010-03-01 10:36:01 -0500
commit647492047763c3ee8fe51ecf9a04f39040aa495b (patch)
treeacdd836ad2695f9e50725c51b667bcc1acb81765 /arch/x86/kvm/x86.c
parentccd469362e826261ccc261c4c36fb0a346338222 (diff)
KVM: fix cleanup_srcu_struct on vm destruction
cleanup_srcu_struct on VM destruction remains broken: BUG: unable to handle kernel paging request at ffffffffffffffff IP: [<ffffffff802533d2>] srcu_read_lock+0x16/0x21 RIP: 0010:[<ffffffff802533d2>] [<ffffffff802533d2>] srcu_read_lock+0x16/0x21 Call Trace: [<ffffffffa05354c4>] kvm_arch_vcpu_uninit+0x1b/0x48 [kvm] [<ffffffffa05339c6>] kvm_vcpu_uninit+0x9/0x15 [kvm] [<ffffffffa0569f7d>] vmx_free_vcpu+0x7f/0x8f [kvm_intel] [<ffffffffa05357b5>] kvm_arch_destroy_vm+0x78/0x111 [kvm] [<ffffffffa053315b>] kvm_put_kvm+0xd4/0xfe [kvm] Move it to kvm_arch_destroy_vm. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Reported-by: Jan Kiszka <jan.kiszka@siemens.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 9b0758b4d550..322c2c5f9bc4 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -5547,6 +5547,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm)
5547 put_page(kvm->arch.apic_access_page); 5547 put_page(kvm->arch.apic_access_page);
5548 if (kvm->arch.ept_identity_pagetable) 5548 if (kvm->arch.ept_identity_pagetable)
5549 put_page(kvm->arch.ept_identity_pagetable); 5549 put_page(kvm->arch.ept_identity_pagetable);
5550 cleanup_srcu_struct(&kvm->srcu);
5550 kfree(kvm->arch.aliases); 5551 kfree(kvm->arch.aliases);
5551 kfree(kvm); 5552 kfree(kvm);
5552} 5553}