aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-05-26 12:04:17 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-30 13:15:12 +0100
commit5b10c8e436b69f25b6dcb5586bbdc5e39c20ed1d (patch)
tree44257d4bcbcbe543453467e2e264c0994233f9e0 /arch/arm/kernel
parentb91d8a1205faa76affc4e1b7d5ccac1d17026970 (diff)
[ARM] Fix stacktrace FP range checking
Fix an oops in the stacktrace code, caused by improper range checking. We subtract 12 off 'fp' before testing to see if it's below the low bound. However, if 'fp' were zero before, it becomes a very large positive number, causing this test to succeed where it should fail. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/stacktrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/stacktrace.c b/arch/arm/kernel/stacktrace.c
index 8b63ad89d0a..ae31deb2d06 100644
--- a/arch/arm/kernel/stacktrace.c
+++ b/arch/arm/kernel/stacktrace.c
@@ -13,7 +13,7 @@ int walk_stackframe(unsigned long fp, unsigned long low, unsigned long high,
/*
* Check current frame pointer is within bounds
*/
- if ((fp - 12) < low || fp + 4 >= high)
+ if (fp < (low + 12) || fp + 4 >= high)
break;
frame = (struct stackframe *)(fp - 12);