mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch] i386: extra checks in show_registers()
@ 2006-06-11 19:07 Chuck Ebbert
  0 siblings, 0 replies; only message in thread
From: Chuck Ebbert @ 2006-06-11 19:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andrew Morton, Ingo Molnar, Linus Torvalds

Sometimes thread_info and task_struct get out-of-sync with each
other.  Printing task.thread_info in show_registers() can help
spot this.  And when task_struct is corrupt then task.comm can
contain garbage, so only print as many characters as it can hold.

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

--- 2.6.17-rc6-32-post.orig/arch/i386/kernel/traps.c
+++ 2.6.17-rc6-32-post/arch/i386/kernel/traps.c
@@ -268,8 +268,9 @@ void show_registers(struct pt_regs *regs
 		regs->esi, regs->edi, regs->ebp, esp);
 	printk(KERN_EMERG "ds: %04x   es: %04x   ss: %04x\n",
 		regs->xds & 0xffff, regs->xes & 0xffff, ss);
-	printk(KERN_EMERG "Process %s (pid: %d, threadinfo=%p task=%p)",
-		current->comm, current->pid, current_thread_info(), current);
+	printk(KERN_EMERG "Process %.*s (pid: %d, ti=%p task=%p task.ti=%p)",
+		TASK_COMM_LEN, current->comm, current->pid,
+		current_thread_info(), current, current->thread_info);
 	/*
 	 * When in-kernel, we also print out the stack and code at the
 	 * time of the fault..
-- 
Chuck

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

only message in thread, other threads:[~2006-06-11 19:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-11 19:07 [patch] i386: extra checks in show_registers() 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®