Skip to contentSkip to conversation

x86_64: Fix dump_trace()

PATCH New OGAWA Hirofumi 1 participant 1 message Jan 3, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: Fix dump_trace()

If caller passed the tsk, we should use it to validate a stack ptr. Otherwise, sysrq-t and other debugging stuff doesn't work.

---

 arch/x86_64/kernel/traps.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86_64/kernel/traps.c renamed from arch/x86_64/kernel/traps.c~x86_64-fix-show_trace +1 -1
diff -puN arch/x86_64/kernel/traps.c~x86_64-fix-show_trace arch/x86_64/kernel/traps.c
@@ -319,7 +319,7 @@ void dump_trace(struct task_struct *tsk,
 	/*
 	 * This handles the process stack:
 	 */
-	tinfo = current_thread_info();
+	tinfo = task_thread_info(tsk);
 	HANDLE_STACK (valid_stack_ptr(tinfo, stack));
 #undef HANDLE_STACK
 	put_cpu();

_

Signature · 1 line
OGAWA Hirofumi <[email protected]>