Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.25-rc7 /kernel/panic.c

Filename:/kernel/panic.c
Lines Added:29
Lines Deleted:5
Also changed in: (Previous) 2.6.25-rc6  2.6.25-rc5  2.6.25-rc4  2.6.25-rc3  2.6.25-rc2  2.6.25-rc1 
(Following) 2.6.25-rc8  2.6.25-rc9  2.6.25  2.6.25-git14  2.6.25-git15  2.6.25-git16 

Location
[  2.6.25-rc7
  [  kernel
     o  panic.c

Patch

diff --git a/kernel/panic.c b/kernel/panic.c
index da4d6ba..24af9f8 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -20,6 +20,7 @@
 #include <linux/kexec.h>
 #include <linux/debug_locks.h>
 #include <linux/random.h>
+#include <linux/kallsyms.h>
 
 int panic_on_oops;
 int tainted;
@@ -160,7 +161,7 @@ const char *print_tainted(void)
 {
    static char buf[20];
    if (tainted) {
-      snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c",
+      snprintf(buf, sizeof(buf), "Tainted: %c%c%c%c%c%c%c%c%c",
          tainted & TAINT_PROPRIETARY_MODULE ? 'P' : 'G',
          tainted & TAINT_FORCED_MODULE ? 'F' : ' ',
          tainted & TAINT_UNSAFE_SMP ? 'S' : ' ',
@@ -168,7 +169,8 @@ const char *print_tainted(void)
          tainted & TAINT_MACHINE_CHECK ? 'M' : ' ',
          tainted & TAINT_BAD_PAGE ? 'B' : ' ',
          tainted & TAINT_USER ? 'U' : ' ',
-         tainted & TAINT_DIE ? 'D' : ' ');
+         tainted & TAINT_DIE ? 'D' : ' ',
+         tainted & TAINT_OVERRIDDEN_ACPI_TABLE ? 'A' : ' ');
    }
    else
       snprintf(buf, sizeof(buf), "Not tainted");
@@ -280,6 +282,13 @@ static int init_oops_id(void)
 }
 late_initcall(init_oops_id);
 
+static void print_oops_end_marker(void)
+{
+   init_oops_id();
+   printk(KERN_WARNING "---[ end trace %016llx ]---\n",
+      (unsigned long long)oops_id);
+}
+
 /*
  * Called when the architecture exits its oops handler, after printing
  * everything.
@@ -287,11 +296,26 @@ late_initcall(init_oops_id);
 void oops_exit(void)
 {
    do_oops_enter_exit();
-   init_oops_id();
-   printk(KERN_WARNING "---[ end trace %016llx ]---\n",
-      (unsigned long long)oops_id);
+   print_oops_end_marker();
 }
 
+#ifdef WANT_WARN_ON_SLOWPATH
+void warn_on_slowpath(const char *file, int line)
+{
+   char function[KSYM_SYMBOL_LEN];
+   unsigned long caller = (unsigned long) __builtin_return_address(0);
+   sprint_symbol(function, caller);
+
+   printk(KERN_WARNING "------------[ cut here ]------------\n");
+   printk(KERN_WARNING "WARNING: at %s:%d %s()\n", file,
+      line, function);
+   print_modules();
+   dump_stack();
+   print_oops_end_marker();
+}
+EXPORT_SYMBOL(warn_on_slowpath);
+#endif
+
 #ifdef CONFIG_CC_STACKPROTECTOR
 /*
  * Called when gcc's -fstack-protector feature is used, and


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.