linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path
@ 2020-01-22  4:55 Bharata B Rao
  2020-01-22  6:54 ` Kamalesh Babulal
  2020-01-30  0:55 ` Paul Mackerras
  0 siblings, 2 replies; 3+ messages in thread
From: Bharata B Rao @ 2020-01-22  4:55 UTC (permalink / raw)
  To: linuxppc-dev, kvm-ppc; +Cc: paulus, Bharata B Rao

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(-)

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))
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path
  2020-01-22  4:55 [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path Bharata B Rao
@ 2020-01-22  6:54 ` Kamalesh Babulal
  2020-01-30  0:55 ` Paul Mackerras
  1 sibling, 0 replies; 3+ messages in thread
From: Kamalesh Babulal @ 2020-01-22  6:54 UTC (permalink / raw)
  To: Bharata B Rao, linuxppc-dev, kvm-ppc; +Cc: paulus

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>

-- 
Kamalesh


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path
  2020-01-22  4:55 [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path Bharata B Rao
  2020-01-22  6:54 ` Kamalesh Babulal
@ 2020-01-30  0:55 ` Paul Mackerras
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Mackerras @ 2020-01-30  0:55 UTC (permalink / raw)
  To: Bharata B Rao; +Cc: paulus, linuxppc-dev, kvm-ppc

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-30  0:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-22  4:55 [PATCH FIX] KVM: PPC: Book3S HV: Release lock on page-out failure path Bharata B Rao
2020-01-22  6:54 ` Kamalesh Babulal
2020-01-30  0:55 ` Paul Mackerras

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).