aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps_64.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@linux.intel.com>2007-11-26 14:42:19 -0500
committerIngo Molnar <mingo@elte.hu>2007-11-26 14:42:19 -0500
commit57c351de715458f8fbee1e92e8cc65ddc00da04c (patch)
treeebf1c2576ab6a15f2018d85a52addec33b87c63c /arch/x86/kernel/traps_64.c
parentc1c306344669ca40255e36192b101060ffbb1271 (diff)
x86: printk kernel version in WARN_ON and other dump_stack users
today, all oopses contain a version number of the kernel, which is nice because the people who actually do bother to read the oops get this vital bit of information always without having to ask the reporter in another round trip. However, WARN_ON() and many other dump_stack() users right now lack this information; the patch below adds this. This information is essential for getting people to use their time effectively when looking at these things; in addition, it's essential for tools that try to collect statistics about defects. Please consider, since its so simple and important for long term kernel quality processes. The code is identical between 32/64 bit; a lot of this code should be unified over time, the patch keeps the identical-ness intact. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/kernel/traps_64.c')
-rw-r--r--arch/x86/kernel/traps_64.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c
index 4a6bd4965f56..1384e34a65a7 100644
--- a/arch/x86/kernel/traps_64.c
+++ b/arch/x86/kernel/traps_64.c
@@ -31,6 +31,7 @@
31#include <linux/uaccess.h> 31#include <linux/uaccess.h>
32#include <linux/bug.h> 32#include <linux/bug.h>
33#include <linux/kdebug.h> 33#include <linux/kdebug.h>
34#include <linux/utsname.h>
34 35
35#if defined(CONFIG_EDAC) 36#if defined(CONFIG_EDAC)
36#include <linux/edac.h> 37#include <linux/edac.h>
@@ -400,6 +401,12 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp)
400void dump_stack(void) 401void dump_stack(void)
401{ 402{
402 unsigned long dummy; 403 unsigned long dummy;
404
405 printk("Pid: %d, comm: %.20s %s %s %.*s\n",
406 current->pid, current->comm, print_tainted(),
407 init_utsname()->release,
408 (int)strcspn(init_utsname()->version, " "),
409 init_utsname()->version);
403 show_trace(NULL, NULL, &dummy); 410 show_trace(NULL, NULL, &dummy);
404} 411}
405 412