[PATCH] futex: Apply recent futex fixes to futex_compat
[pandora-kernel.git] / kernel / panic.c
index acd95ad..d8a0bca 100644 (file)
@@ -8,7 +8,6 @@
  * This function is used through-out the kernel (including mm and fs)
  * to indicate a major problem.
  */
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/delay.h>
@@ -27,9 +26,8 @@ static int pause_on_oops_flag;
 static DEFINE_SPINLOCK(pause_on_oops_lock);
 
 int panic_timeout;
-EXPORT_SYMBOL(panic_timeout);
 
-struct notifier_block *panic_notifier_list;
+ATOMIC_NOTIFIER_HEAD(panic_notifier_list);
 
 EXPORT_SYMBOL(panic_notifier_list);
 
@@ -97,7 +95,7 @@ NORET_TYPE void panic(const char * fmt, ...)
        smp_send_stop();
 #endif
 
-       notifier_call_chain(&panic_notifier_list, 0, buf);
+       atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
        if (!panic_blink)
                panic_blink = no_blink;
@@ -174,6 +172,7 @@ const char *print_tainted(void)
 
 void add_taint(unsigned flag)
 {
+       debug_locks_off(); /* can't trust the integrity of the kernel anymore */
        tainted |= flag;
 }
 EXPORT_SYMBOL(add_taint);
@@ -258,6 +257,7 @@ int oops_may_print(void)
  */
 void oops_enter(void)
 {
+       debug_locks_off(); /* can't trust the integrity of the kernel anymore */
        do_oops_enter_exit();
 }