rpms/kernel/F-9 print-dmi-hw-name-in-warnings.patch, NONE, 1.1.2.1 kernel.spec, 1.891.2.15, 1.891.2.16
Kyle McMartin
kyle at fedoraproject.org
Wed Feb 4 20:14:40 UTC 2009
Author: kyle
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27830
Modified Files:
Tag: private-fedora-9-2_6_27-branch
kernel.spec
Added Files:
Tag: private-fedora-9-2_6_27-branch
print-dmi-hw-name-in-warnings.patch
Log Message:
* Wed Feb 04 2009 Kyle McMartin <kyle at redhat.com> 2.6.27.14-78.2.16
- Print DMI product name in WARN{,_ON} dumps, backported from 2.6.29.
print-dmi-hw-name-in-warnings.patch:
--- NEW FILE print-dmi-hw-name-in-warnings.patch ---
diff --git a/arch/x86/kernel/process_32.c b/arch/x86/kernel/process_32.c
index 31f40b2..4b0f4e7 100644
--- a/arch/x86/kernel/process_32.c
+++ b/arch/x86/kernel/process_32.c
@@ -37,6 +37,7 @@
#include <linux/tick.h>
#include <linux/percpu.h>
#include <linux/prctl.h>
+#include <linux/dmi.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -161,6 +162,7 @@ void __show_registers(struct pt_regs *regs, int all)
unsigned long d0, d1, d2, d3, d6, d7;
unsigned long sp;
unsigned short ss, gs;
+ const char *board;
if (user_mode_vm(regs)) {
sp = regs->sp;
@@ -173,11 +175,15 @@ void __show_registers(struct pt_regs *regs, int all)
}
printk("\n");
- printk("Pid: %d, comm: %s %s (%s %.*s)\n",
+
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (!board)
+ board = "";
+ printk("Pid: %d, comm: %s %s (%s %.*s) %s\n",
task_pid_nr(current), current->comm,
print_tainted(), init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
- init_utsname()->version);
+ init_utsname()->version, board);
printk("EIP: %04x:[<%08lx>] EFLAGS: %08lx CPU: %d\n",
(u16)regs->cs, regs->ip, regs->flags,
diff --git a/kernel/panic.c b/kernel/panic.c
index ea32fa7..0da2281 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -21,6 +21,7 @@
#include <linux/debug_locks.h>
#include <linux/random.h>
#include <linux/kallsyms.h>
+#include <linux/dmi.h>
int panic_on_oops;
int tainted;
@@ -308,11 +309,17 @@ void warn_on_slowpath(const char *file, int line)
{
char function[KSYM_SYMBOL_LEN];
unsigned long caller = (unsigned long) __builtin_return_address(0);
+ const char *board;
+
sprint_symbol(function, caller);
printk(KERN_WARNING "------------[ cut here ]------------\n");
printk(KERN_WARNING "WARNING: at %s:%d %s() (%s)\n", file,
line, function, print_tainted());
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (board)
+ printk(KERN_WARNING "Hardware name: %s\n", board);
+
print_modules();
dump_stack();
print_oops_end_marker();
@@ -326,11 +333,16 @@ void warn_slowpath(const char *file, int line, const char *fmt, ...)
va_list args;
char function[KSYM_SYMBOL_LEN];
unsigned long caller = (unsigned long)__builtin_return_address(0);
+ const char *board;
+
sprint_symbol(function, caller);
printk(KERN_WARNING "------------[ cut here ]------------\n");
printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
line, function);
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (board)
+ printk(KERN_WARNING "Hardware name: %s\n", board);
va_start(args, fmt);
vprintk(fmt, args);
va_end(args);
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.891.2.15
retrieving revision 1.891.2.16
diff -u -r1.891.2.15 -r1.891.2.16
--- kernel.spec 2 Feb 2009 23:55:33 -0000 1.891.2.15
+++ kernel.spec 4 Feb 2009 20:14:08 -0000 1.891.2.16
@@ -628,6 +628,7 @@
Patch280: linux-2.6-debug-spinlock-taint.patch
Patch330: linux-2.6-debug-no-quiet.patch
Patch340: linux-2.6-debug-vm-would-have-oomkilled.patch
+Patch350: print-dmi-hw-name-in-warnings.patch
Patch370: linux-2.6-crash-driver.patch
Patch379: linux-2.6-defaults-fat-utf8.patch
@@ -1172,6 +1173,7 @@
ApplyPatch linux-2.6-debug-no-quiet.patch
%endif
ApplyPatch linux-2.6-debug-vm-would-have-oomkilled.patch
+ApplyPatch print-dmi-hw-name-in-warnings.patch
#
# /dev/crash driver for the crashdump analysis tool
@@ -1917,6 +1919,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Wed Feb 04 2009 Kyle McMartin <kyle at redhat.com> 2.6.27.14-78.2.16
+- Print DMI product name in WARN{,_ON} dumps, backported from 2.6.29.
+
* Mon Feb 02 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.14-78.2.15
- Fix slow data upload with USB wireless modem (F10#473252)
More information about the fedora-extras-commits
mailing list