diff options
-rw-r--r-- | arch/ia64/kvm/kvm-ia64.c | 1 | ||||
-rw-r--r-- | arch/powerpc/kvm/powerpc.c | 1 | ||||
-rw-r--r-- | arch/s390/kvm/kvm-s390.c | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 1 | ||||
-rw-r--r-- | virt/kvm/kvm_main.c | 1 |
5 files changed, 4 insertions, 1 deletions
diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index e6ac549f8d55..06188988ed27 100644 --- a/arch/ia64/kvm/kvm-ia64.c +++ b/arch/ia64/kvm/kvm-ia64.c | |||
@@ -1404,6 +1404,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
1404 | kfree(kvm->arch.vioapic); | 1404 | kfree(kvm->arch.vioapic); |
1405 | kvm_release_vm_pages(kvm); | 1405 | kvm_release_vm_pages(kvm); |
1406 | kvm_free_physmem(kvm); | 1406 | kvm_free_physmem(kvm); |
1407 | cleanup_srcu_struct(&kvm->srcu); | ||
1407 | free_kvm(kvm); | 1408 | free_kvm(kvm); |
1408 | } | 1409 | } |
1409 | 1410 | ||
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 2c291161df89..51aedd7f16bc 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c | |||
@@ -137,6 +137,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
137 | { | 137 | { |
138 | kvmppc_free_vcpus(kvm); | 138 | kvmppc_free_vcpus(kvm); |
139 | kvm_free_physmem(kvm); | 139 | kvm_free_physmem(kvm); |
140 | cleanup_srcu_struct(&kvm->srcu); | ||
140 | kfree(kvm); | 141 | kfree(kvm); |
141 | } | 142 | } |
142 | 143 | ||
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c index c8002193d9d4..49292869a5cd 100644 --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c | |||
@@ -242,6 +242,7 @@ void kvm_arch_destroy_vm(struct kvm *kvm) | |||
242 | kvm_free_physmem(kvm); | 242 | kvm_free_physmem(kvm); |
243 | free_page((unsigned long)(kvm->arch.sca)); | 243 | free_page((unsigned long)(kvm->arch.sca)); |
244 | debug_unregister(kvm->arch.dbf); | 244 | debug_unregister(kvm->arch.dbf); |
245 | cleanup_srcu_struct(&kvm->srcu); | ||
245 | kfree(kvm); | 246 | kfree(kvm); |
246 | } | 247 | } |
247 | 248 | ||
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 | } |
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2b7cd6c0d9ca..7c5c873812ff 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -506,7 +506,6 @@ static void kvm_destroy_vm(struct kvm *kvm) | |||
506 | #else | 506 | #else |
507 | kvm_arch_flush_shadow(kvm); | 507 | kvm_arch_flush_shadow(kvm); |
508 | #endif | 508 | #endif |
509 | cleanup_srcu_struct(&kvm->srcu); | ||
510 | kvm_arch_destroy_vm(kvm); | 509 | kvm_arch_destroy_vm(kvm); |
511 | hardware_disable_all(); | 510 | hardware_disable_all(); |
512 | mmdrop(mm); | 511 | mmdrop(mm); |