]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails
authorSean Christopherson <sean.j.christopherson@intel.com>
Wed, 18 Dec 2019 21:54:46 +0000 (13:54 -0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 17 Feb 2020 10:10:47 +0000 (11:10 +0100)
commitf4001f64c06f5ac43aea379d625eb594e3ac5316
tree14267023d536895b2c8febb327dbf090f42c20f4
parent635ea29f6557846a313b82e3523923b84e3bbbe9
KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails

BugLink: https://bugs.launchpad.net/bugs/1863588
commit 1a978d9d3e72ddfa40ac60d26301b154247ee0bc upstream.

Call kvm_vcpu_uninit() if vcore creation fails to avoid leaking any
resources allocated by kvm_vcpu_init(), i.e. the vcpu->run page.

Fixes: 371fefd6f2dc4 ("KVM: PPC: Allow book3s_hv guests to use SMT processor modes")
Cc: stable@vger.kernel.org
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Acked-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
arch/powerpc/kvm/book3s_hv.c