aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-12-13 01:04:21 +0800
committerAndy Green <andy.green@linaro.org>2012-01-09 10:25:02 +0800
commit1f807621017c8ffede5a2d4b3255c9a6adc0099a (patch)
tree8a765490b4ae87d3c240406bb3fd8a725b7a209a
parentbef46ad1ad53da040fa3825c6b3814573455f308 (diff)
ARM: Fix up vfp exception location in thumb mode
The exception handler in entry-armv.S checks for thumb mode and correctly determines the exception location and instruction, but VFP_bounce uses the uncorrected location off the stack. If the VFP exception occured in Thumb mode, fix up the exception location on the stack to match the value that would be returned in ARM mode. Fixes segfaults in userspace applications running in Thumb mode caused by a handled VFP exception returning to the middle of the instruction that triggered the exception. Change-Id: I02be4c5b546561d9a967a02c1e9eb1de876cff07 Original-author: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Colin Cross <ccross@android.com>
-rw-r--r--arch/arm/kernel/entry-armv.S1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index b145f16c91b..7f02227c697 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -469,6 +469,7 @@ __und_usr:
blo __und_usr_unknown
3: ldrht r0, [r4]
add r2, r2, #2 @ r2 is PC + 2, make it PC + 4
+ str r2, [sp, #S_PC] @ it's a 2x16bit instr, update
orr r0, r0, r5, lsl #16
#if __LINUX_ARM_ARCH__ < 7