Commit dcdeeef8 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] print kernel version in oops messages

From: Arjan van de Ven <arjanv@redhat.com>

Unfortunatly a large portion of the oops reports lack the basic
information about what kernel version the oops is for; it's trivial to just
print this in the oops as well to improve the usefulness of bugreports...
parent 19175f1d
......@@ -28,6 +28,7 @@
#include <linux/a.out.h>
#include <linux/interrupt.h>
#include <linux/config.h>
#include <linux/version.h>
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/init.h>
......@@ -222,7 +223,7 @@ void show_regs(struct pt_regs * regs)
if (regs->xcs & 3)
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s\n",regs->eflags, print_tainted());
printk(" EFLAGS: %08lx %s (%s)\n",regs->eflags, print_tainted(),UTS_RELEASE);
printk("EAX: %08lx EBX: %08lx ECX: %08lx EDX: %08lx\n",
regs->eax,regs->ebx,regs->ecx,regs->edx);
printk("ESI: %08lx EDI: %08lx EBP: %08lx",
......
......@@ -25,6 +25,7 @@
#include <linux/highmem.h>
#include <linux/kallsyms.h>
#include <linux/ptrace.h>
#include <linux/version.h>
#ifdef CONFIG_EISA
#include <linux/ioport.h>
......@@ -175,9 +176,10 @@ void show_registers(struct pt_regs *regs)
ss = regs->xss & 0xffff;
}
print_modules();
printk("CPU: %d\nEIP: %04x:[<%08lx>] %s\nEFLAGS: %08lx\n",
smp_processor_id(), 0xffff & regs->xcs, regs->eip, print_tainted(), regs->eflags);
printk("CPU: %d\nEIP: %04x:[<%08lx>] %s\nEFLAGS: %08lx"
" (%s) \n",
smp_processor_id(), 0xffff & regs->xcs, regs->eip,
print_tainted(), regs->eflags, UTS_RELEASE);
print_symbol("EIP is at %s\n", regs->eip);
printk("eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n",
regs->eax, regs->ebx, regs->ecx, regs->edx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment