diff options
author | Bharata B Rao <bharata@linux.ibm.com> | 2020-01-22 05:55:42 +0100 |
---|---|---|
committer | Paul Mackerras <paulus@ozlabs.org> | 2020-01-29 06:47:45 +0100 |
commit | e032e3b55b6f487e48c163c5dca74086f147a169 (patch) | |
tree | fe54aaa13a567edb1122f18b86894783d652712d /arch/powerpc/kvm | |
parent | KVM: PPC: Book3S HV: Implement H_SVM_INIT_ABORT hcall (diff) | |
download | linux-e032e3b55b6f487e48c163c5dca74086f147a169.tar.xz linux-e032e3b55b6f487e48c163c5dca74086f147a169.zip |
KVM: PPC: Book3S HV: Release lock on page-out failure path
When migrate_vma_setup() fails in kvmppc_svm_page_out(),
release kvm->arch.uvmem_lock before returning.
Fixes: ca9f4942670 ("KVM: PPC: Book3S HV: Support for running secure guests")
Signed-off-by: Bharata B Rao <bharata@linux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_hv_uvmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_hv_uvmem.c index 4d1f25a3959a..79b1202b1c62 100644 --- a/arch/powerpc/kvm/book3s_hv_uvmem.c +++ b/arch/powerpc/kvm/book3s_hv_uvmem.c @@ -571,7 +571,7 @@ kvmppc_svm_page_out(struct vm_area_struct *vma, unsigned long start, ret = migrate_vma_setup(&mig); if (ret) - return ret; + goto out; spage = migrate_pfn_to_page(*mig.src); if (!spage || !(*mig.src & MIGRATE_PFN_MIGRATE)) |