summaryrefslogtreecommitdiffstats
path: root/arch/i386
diff options
context:
space:
mode:
authorChuck Ebbert <76306.1226@compuserve.com>2006-06-23 02:04:31 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 07:42:59 -0700
commit7e04a1183eac3e6b3570a154c8677fd9184b51e7 (patch)
treec7e65549871504bb4df03982f9a7581aa6417cab /arch/i386
parent722f4f5b2600b8930b63a096e48b878cd6e0e15a (diff)
downloadop-kernel-dev-7e04a1183eac3e6b3570a154c8677fd9184b51e7.zip
op-kernel-dev-7e04a1183eac3e6b3570a154c8677fd9184b51e7.tar.gz
[PATCH] i386: extra checks in show_registers()
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> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386')
-rw-r--r--arch/i386/kernel/traps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index df9d210..dcc1447 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -274,8 +274,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..
OpenPOWER on IntegriCloud