Skip to contentSkip to conversation

printk: when dumping regs, show the stack, not thread_info

PATCH New [email protected] 1 participant 1 message Jul 28, 2016 Printk

lore
Share & tools
lore
#0 lore raw

PATCH 78/101 printk: when dumping regs, show the stack, not thread_info

From: Andy Lutomirski <[email protected]>
Subject: printk: when dumping regs, show the stack, not thread_info

We currently show:

task: <current> ti: <current_thread_info()> task.ti: <task_thread_info(current)>"

"ti" and "task.ti" are redundant, and neither is actually what we want to show, which the the base of the thread stack. Change the display to show the stack pointer explicitly.

---

 kernel/printk/printk.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
kernel/printk/printk.c renamed from kernel/printk/printk.c~printk-when-dumping-regs-show-the-stack-not-thread_info +2 -3
diff -puN kernel/printk/printk.c~printk-when-dumping-regs-show-the-stack-not-thread_info kernel/printk/printk.c
@@ -3177,9 +3177,8 @@ void show_regs_print_info(const char *lo
 {
 	dump_stack_print_info(log_lvl);
 
-	printk("%stask: %p ti: %p task.ti: %p\n",
-	       log_lvl, current, current_thread_info(),
-	       task_thread_info(current));
+	printk("%stask: %p task.stack: %p\n",
+	       log_lvl, current, task_stack_page(current));
 }
 
 #endif

_