Thread (3 messages) flat view 3 messages, 3 authors, 2014-06-24

RE: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching atttribute

From: Bharat.Bhushan@freescale.com <hidden>
Date: 2014-06-18 16:01:10
Also in: kvm

-----Original Message-----
From: Mihai Caraman [mailto:mihai.caraman@freescale.com]
Sent: Wednesday, June 18, 2014 9:15 PM
To: kvm-ppc@vger.kernel.org
Cc: kvm@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Caraman Mihai Cla=
udiu-
B02008; Bhushan Bharat-R65777
Subject: [PATCH] KVM: PPC: Book3E: Unlock mmu_lock when setting caching
atttribute
=20
The patch 08c9a188d0d0fc0f0c5e17d89a06bb59c493110f
  	kvm: powerpc: use caching attributes as per linux pte
do not handle properly the error case, letting mmu_lock locked. The lock
will further generate a RCU stall from kvmppc_e500_emul_tlbwe() caller.
=20
In case of an error go to out label.
=20
Signed-off-by: Mihai Caraman <redacted>
Cc: Bharat Bhushan <redacted>
Thanks mike for fixing this; I am curious to know how you reached to this p=
oint :)

Reviewed-by: Bharat Bhushan <redacted>

Regards
-Bharat
quoted hunk ↗ jump to hunk
---
 arch/powerpc/kvm/e500_mmu_host.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
=20
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu=
_host.c
quoted hunk ↗ jump to hunk
index 0528fe5..54144c7 100644
--- a/arch/powerpc/kvm/e500_mmu_host.c
+++ b/arch/powerpc/kvm/e500_mmu_host.c
@@ -473,7 +473,8 @@ static inline int kvmppc_e500_shadow_map(struct
kvmppc_vcpu_e500 *vcpu_e500,
 		if (printk_ratelimit())
 			pr_err("%s: pte not present: gfn %lx, pfn %lx\n",
 				__func__, (long)gfn, pfn);
-		return -EINVAL;
+		ret =3D -EINVAL;
+		goto out;
 	}
 	kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
=20
--
1.7.11.7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help