diff options
author | Seth Forshee <seth.forshee@gmail.com> | 2009-03-02 22:39:36 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-03-03 12:11:25 +0000 |
commit | 25ef4a67e78e1322d55f0a38783537ed89addc02 (patch) | |
tree | 030221d967bba0ab8d5274159063f839e6f503cc /arch | |
parent | c8532db7f2661b63f658b9a08cf4053a3e6abb78 (diff) | |
download | linux-25ef4a67e78e1322d55f0a38783537ed89addc02.tar.gz linux-25ef4a67e78e1322d55f0a38783537ed89addc02.tar.bz2 linux-25ef4a67e78e1322d55f0a38783537ed89addc02.zip |
[ARM] 5416/1: Use unused address in v6_early_abort
The target of the strex instruction to clear the exlusive monitor
is currently the top of the stack. If the store succeeeds this
corrupts r0 in pt_regs. Use the next stack location instead of
the current one to prevent any chance of corrupting an in-use
address.
Signed-off-by: Seth Forshee <seth.forshee@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/abort-ev6.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S index 8a7f65ba14b7..94077fbd96b7 100644 --- a/arch/arm/mm/abort-ev6.S +++ b/arch/arm/mm/abort-ev6.S @@ -23,7 +23,8 @@ ENTRY(v6_early_abort) #ifdef CONFIG_CPU_32v6K clrex #else - strex r0, r1, [sp] @ Clear the exclusive monitor + sub r1, sp, #4 @ Get unused stack location + strex r0, r1, [r1] @ Clear the exclusive monitor #endif mrc p15, 0, r1, c5, c0, 0 @ get FSR mrc p15, 0, r0, c6, c0, 0 @ get FAR |