PCI: Tolerate hierarchies with no Root Port
[linux-2.6-block.git] / kernel / kexec.c
index 7a36fdcca5bfb064a6709021782c98bd2a6de179..a785c1015e25bf1ecacd3a6d92956e3e630e7f37 100644 (file)
@@ -84,6 +84,17 @@ struct resource crashk_low_res = {
 
 int kexec_should_crash(struct task_struct *p)
 {
+       /*
+        * If crash_kexec_post_notifiers is enabled, don't run
+        * crash_kexec() here yet, which must be run after panic
+        * notifiers in panic().
+        */
+       if (crash_kexec_post_notifiers)
+               return 0;
+       /*
+        * There are 4 panic() calls in do_exit() path, each of which
+        * corresponds to each of these 4 conditions.
+        */
        if (in_interrupt() || !p->pid || is_global_init(p) || panic_on_oops)
                return 1;
        return 0;