diff options
author | David S. Miller <davem@davemloft.net> | 2006-02-01 02:34:51 (GMT) |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 09:11:29 (GMT) |
commit | 86b818687d4894063ecd1190e54717a0cce8c009 (patch) | |
tree | d2951295358502c88f7fe0c02517d729cff4eb9a /arch/sparc64/kernel/rtrap.S | |
parent | 9954863975910a1b9372b7d5006a6cba43bdd288 (diff) | |
download | linux-fsl-qoriq-86b818687d4894063ecd1190e54717a0cce8c009.tar.xz |
[SPARC64]: Fix race in LOAD_PER_CPU_BASE()
Since we use %g5 itself as a temporary, it can get clobbered
if we take an interrupt mid-stream and thus cause end up with
the final %g5 value too early as a result of rtrap processing.
Set %g5 at the very end, atomically, to avoid this problem.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/rtrap.S')
-rw-r--r-- | arch/sparc64/kernel/rtrap.S | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 89794ebd..64bc036 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S @@ -226,7 +226,7 @@ rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 brz,pt %l3, 1f nop /* Must do this before thread reg is clobbered below. */ - LOAD_PER_CPU_BASE(%g6, %g7) + LOAD_PER_CPU_BASE(%i0, %i1, %i2) 1: ldx [%sp + PTREGS_OFF + PT_V9_G6], %g6 ldx [%sp + PTREGS_OFF + PT_V9_G7], %g7 |