[patch, -rc5-mm1] lock validator: fix stacktrace on x86_64

From: Ingo Molnar
Date: Wed May 31 2006 - 08:30:58 EST


replacement for lockdep-stacktrace-oops-workaround.patch:

------------------
Subject: lock validator: fix stacktrace on x86_64
From: Ingo Molnar <mingo@xxxxxxx>

after hours of hair-pulling by Arjan and me the "x86_64 crashes
on bootup" problem got traced back to a brown-paperbag 32/64-bit
mixup. Sign extension got us lucky, but that luck vanished in
2.6.17-rc5-mm1 ...

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
---
arch/x86_64/kernel/stacktrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux/arch/x86_64/kernel/stacktrace.c
===================================================================
--- linux.orig/arch/x86_64/kernel/stacktrace.c
+++ linux/arch/x86_64/kernel/stacktrace.c
@@ -115,9 +115,9 @@ save_context_stack(struct stack_trace *t
unsigned long addr;

#ifdef CONFIG_FRAME_POINTER
- unsigned prev_stack = 0;
+ unsigned long prev_stack = 0;

- while (in_range(prev_stack, (unsigned long)stack, stack_end)) {
+ while (in_range(prev_stack, stack, stack_end)) {
pr_debug("stack: %p\n", (void *)stack);
addr = (unsigned long)(((unsigned long *)stack)[1]);
pr_debug("addr: %p\n", (void *)addr);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/