aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index 6bbf7b905c76..73d365199c3f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -21,6 +21,7 @@
21#include <linux/debug_locks.h> 21#include <linux/debug_locks.h>
22#include <linux/random.h> 22#include <linux/random.h>
23#include <linux/kallsyms.h> 23#include <linux/kallsyms.h>
24#include <linux/dmi.h>
24 25
25int panic_on_oops; 26int panic_on_oops;
26static unsigned long tainted_mask; 27static unsigned long tainted_mask;
@@ -325,11 +326,16 @@ void warn_slowpath(const char *file, int line, const char *fmt, ...)
325 va_list args; 326 va_list args;
326 char function[KSYM_SYMBOL_LEN]; 327 char function[KSYM_SYMBOL_LEN];
327 unsigned long caller = (unsigned long)__builtin_return_address(0); 328 unsigned long caller = (unsigned long)__builtin_return_address(0);
329 const char *board;
330
328 sprint_symbol(function, caller); 331 sprint_symbol(function, caller);
329 332
330 printk(KERN_WARNING "------------[ cut here ]------------\n"); 333 printk(KERN_WARNING "------------[ cut here ]------------\n");
331 printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file, 334 printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
332 line, function); 335 line, function);
336 board = dmi_get_system_info(DMI_PRODUCT_NAME);
337 if (board)
338 printk(KERN_WARNING "Hardware name: %s\n", board);
333 339
334 if (fmt) { 340 if (fmt) {
335 va_start(args, fmt); 341 va_start(args, fmt);