[patch] i386: fix dump_stack()

From: Chuck Ebbert
Date: Mon Mar 06 2006 - 13:25:10 EST


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@xxxxxxxxxxxxxx>

--- 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!"
-
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/