]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/s390/kvm/kvm-s390.c
KVM: s390: Fix memory leak of vcpu->run
[mirror_ubuntu-bionic-kernel.git] / arch / s390 / kvm / kvm-s390.c
index 3db9e5d45a67a1e3bba84a0be3a445a04a438892..76f05ddaef10fbfe5a3c17d4e337f4a05e07ea78 100644 (file)
@@ -198,6 +198,7 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
 {
        VCPU_EVENT(vcpu, 3, "%s", "free cpu");
        free_page((unsigned long)(vcpu->arch.sie_block));
+       kvm_vcpu_uninit(vcpu);
        kfree(vcpu);
 }
 
@@ -230,8 +231,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
 
 void kvm_arch_vcpu_uninit(struct kvm_vcpu *vcpu)
 {
-       /* kvm common code refers to this, but does'nt call it */
-       BUG();
+       /* Nothing todo */
 }
 
 void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)