[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200221072435.741813944@linuxfoundation.org>
Date: Fri, 21 Feb 2020 08:41:25 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Bharata B Rao <bharata@...ux.ibm.com>,
Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...abs.org>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.5 360/399] KVM: PPC: Book3S HV: Release lock on page-out failure path
From: Bharata B Rao <bharata@...ux.ibm.com>
[ Upstream commit e032e3b55b6f487e48c163c5dca74086f147a169 ]
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@...ux.ibm.com>
Reviewed-by: Kamalesh Babulal <kamalesh@...ux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@...abs.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kvm/book3s_hv_uvmem.c b/arch/powerpc/kvm/book3s_hv_uvmem.c
index 2de264fc31563..5914fbfa5e0a7 100644
--- a/arch/powerpc/kvm/book3s_hv_uvmem.c
+++ b/arch/powerpc/kvm/book3s_hv_uvmem.c
@@ -543,7 +543,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))
--
2.20.1
Powered by blists - more mailing lists