X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=kernel%2Fkexec.c;h=a785c1015e25bf1ecacd3a6d92956e3e630e7f37;hb=964927f3119289b72e34d8eea65b0fc62b47b499;hp=7a36fdcca5bfb064a6709021782c98bd2a6de179;hpb=6917aeedabe8e984e72a0bf78d361d2ee656cbe6;p=cascardo%2Flinux.git diff --git a/kernel/kexec.c b/kernel/kexec.c index 7a36fdcca5bf..a785c1015e25 100644 --- a/kernel/kexec.c +++ b/kernel/kexec.c @@ -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;