From: Marc Zyngier <[email protected]>

This patch looks like it should be in the 3.10-stable tree, should we apply
it?

------------------

From: "Marc Zyngier <[email protected]>"

commit 22cfbb6d730ca2fda236b507d9fba17bf002736c upstream

Make sure we clear the exclusive monitor on all exception returns,
which otherwise could lead to lock corruptions.

Cc: <[email protected]> # 3.10.x: 479c5ae2: ARM: KVM: add missing
Cc: <[email protected]> # 3.10.x: 6a077e4a: ARM: KVM: perform
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Christoffer Dall <[email protected]>
Signed-off-by: Jonghwan Choi <[email protected]>
---
 arch/arm/kvm/interrupts.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/kvm/interrupts.S b/arch/arm/kvm/interrupts.S
index ba904c0..2a2e5fa 100644
--- a/arch/arm/kvm/interrupts.S
+++ b/arch/arm/kvm/interrupts.S
@@ -289,6 +289,7 @@ THUMB(      orr     r2, r2, #PSR_T_BIT      )
        ldr     r2, =BSYM(panic)
        msr     ELR_hyp, r2
        ldr     r0, =\panic_str
+       clrex                           @ Clear exclusive monitor
        eret
 .endm
 
@@ -438,6 +439,7 @@ guest_trap:
 
 4:     pop     {r0, r1}                @ Failed translation, return to guest
        mcrr    p15, 0, r0, r1, c7      @ PAR
+       clrex
        pop     {r0, r1, r2}
        eret
 
@@ -464,6 +466,7 @@ switch_to_guest_vfp:
 
        pop     {r3-r7}
        pop     {r0-r2}
+       clrex
        eret
 #endif
 
-- 
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to