]> git.baikalelectronics.ru Git - kernel.git/commitdiff
KVM: PPC: Book3S HV: Release lock on page-out failure path
authorBharata B Rao <bharata@linux.ibm.com>
Wed, 22 Jan 2020 04:55:42 +0000 (10:25 +0530)
committerPaul Mackerras <paulus@ozlabs.org>
Wed, 29 Jan 2020 05:47:45 +0000 (16:47 +1100)
When migrate_vma_setup() fails in kvmppc_svm_page_out(),
release kvm->arch.uvmem_lock before returning.

Fixes: 11b644cebd6 ("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>
arch/powerpc/kvm/book3s_hv_uvmem.c

index 4d1f25a3959a542a2de48a360ab23dbf96e01e69..79b1202b1c628e92acb6a0bb928926c73d18a13e 100644 (file)
@@ -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))