Message ID | 20200122045542.3527-1-bharata@linux.ibm.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | [FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (20862247a368dbb75d6e97d82345999adaacf3cc) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 8 lines checked |
snowpatch_ozlabs/needsstable | warning | Please consider tagging this patch for stable! |
On 1/22/20 10:25 AM, Bharata B Rao wrote: > 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>
On Wed, Jan 22, 2020 at 10:25:42AM +0530, Bharata B Rao wrote: > 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> Thanks, applied to my kvm-ppc-next branch. Paul.
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))
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> --- Applies on paulus/kvm-ppc-next branch arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)