aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2007-05-26 07:04:17 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-05-30 08:15:12 -0400
commit5b10c8e436b69f25b6dcb5586bbdc5e39c20ed1d (patch)
tree44257d4bcbcbe543453467e2e264c0994233f9e0
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>
-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 8b63ad89d0a8..ae31deb2d065 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,
13 /* 13 /*
14 * Check current frame pointer is within bounds 14 * Check current frame pointer is within bounds
15 */ 15 */
16 if ((fp - 12) < low || fp + 4 >= high) 16 if (fp < (low + 12) || fp + 4 >= high)
17 break; 17 break;
18 18
19 frame = (struct stackframe *)(fp - 12); 19 frame = (struct stackframe *)(fp - 12);