mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] i386: fix dump_stack()
@ 2006-03-06 18:25 Chuck Ebbert
  0 siblings, 0 replies; only message in thread
From: Chuck Ebbert @ 2006-03-06 18:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Linus Torvalds

i386 has a small bug in the stack dump code where it prints
an extra log level code.  Remove that and fix the alignment
of normal stack dump printout. Also remove some unnecessary
printk() calls.

Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>

--- 2.6.16-rc5-32.orig/arch/i386/kernel/traps.c
+++ 2.6.16-rc5-32/arch/i386/kernel/traps.c
@@ -190,25 +190,20 @@ static void show_stack_log_lvl(struct ta
 	}
 
 	stack = esp;
-	printk(log_lvl);
 	for(i = 0; i < kstack_depth_to_print; i++) {
 		if (kstack_end(stack))
 			break;
-		if (i && ((i % 8) == 0)) {
-			printk("\n");
-			printk(log_lvl);
-			printk("       ");
-		}
+		if (i && ((i % 8) == 0))
+			printk("\n%s       ", log_lvl);
 		printk("%08lx ", *stack++);
 	}
-	printk("\n");
-	printk(log_lvl);
-	printk("Call Trace:\n");
+	printk("\n%sCall Trace:\n", log_lvl);
 	show_trace_log_lvl(task, esp, log_lvl);
 }
 
 void show_stack(struct task_struct *task, unsigned long *esp)
 {
+	printk("       ");
 	show_stack_log_lvl(task, esp, "");
 }
 
-- 
Chuck
"Penguins don't come from next door, they come from the Antarctic!"

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-06 18:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 18:25 [patch] i386: fix dump_stack() Chuck Ebbert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®