kexec: use core_param for crash_kexec_post_notifiers boot option
PATCH 84/111 kexec: use core_param for crash_kexec_post_notifiers boot option
From: Hidehiro Kawai <[email protected]>
Subject: kexec: use core_param for crash_kexec_post_notifiers boot option
crash_kexec_post_notifiers ia a boot option which controls whether the 1st kernel calls panic notifiers or not before booting the 2nd kernel. However, there is no need to limit it to being modifiable only at boot time. So, use core_param instead of early_param.
Signed-off-by Hidehiro Kawai <[email protected]>
Cc Dave Young <[email protected]>
Cc Baoquan He <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Eric Biederman <[email protected]>
Cc Masami Hiramatsu <[email protected]>
Cc Borislav Petkov <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/panic.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-)
kernel/panic.c renamed from kernel/panic.c~kexec-use-core_param-for-crash_kexec_post_notifiers-boot-option +3 -2
@@ -108,6 +108,7 @@ void panic(const char *fmt, ...)long i, i_next =0 ;int state =0 ;int old_cpu, this_cpu; +bool _crash_kexec_post_notifiers = crash_kexec_post_notifiers;/* * Disable local interrupts. This will prevent panic_smp_self_stop
@@ -160,7 +161,7 @@ void panic(const char *fmt, ...)* * Bypass the panic_cpu check and call __crash_kexec directly. */ -if (!crash_kexec_post_notifiers) { +if (!_crash_kexec_post_notifiers) {printk_nmi_flush_on_panic ();__crash_kexec (NULL ); }
@@ -191,7 +192,7 @@ void panic(const char *fmt, ...)* * Bypass the panic_cpu check and call __crash_kexec directly. */ -if (crash_kexec_post_notifiers) +if (_crash_kexec_post_notifiers)__crash_kexec (NULL );bust_spinlocks (0 );
@@ -571,13 +572,7 @@ EXPORT_SYMBOL(__stack_chk_fail);core_param (panic, panic_timeout, int,0644 );core_param (pause_on_oops, pause_on_oops, int,0644 );core_param (panic_on_warn, panic_on_warn, int,0644 );