Skip to contentSkip to conversation

lock validator: fix stacktrace on x86_64

PATCH New Ingo Molnar 1 participant 1 message May 31, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lock validator: fix stacktrace on x86_64

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

------------------
Subject: lock validator: fix stacktrace on x86_64
From: Ingo Molnar <[email protected]>

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 ...

---
 arch/x86_64/kernel/stacktrace.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86_64/kernel/stacktrace.c +2 -2
Index: 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);