[PATCH v3 1/2] kernel/panic: call the 2nd crash_kexec() only if crash_kexec_post_notifiers is enabled
HATAYAMA Daisuke
d.hatayama at jp.fujitsu.com
Fri May 15 04:01:44 PDT 2015
For compatibility with the behaviour before the commit
f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45, the 2nd crash_kexec() should
be called only if crash_kexec_post_notifiers is enabled.
Note that crash_kexec() returns immediately if kdump crash kernel is
not loaded, so in this case, this patch makes no functionality change,
but the point is to make it explicit, from the caller panic() side,
that the 2nd crash_kexec() does nothing.
Signed-off-by: HATAYAMA Daisuke <d.hatayama at jp.fujitsu.com>
Suggested-by: Ingo Molnar <mingo at kernel.org>
---
kernel/panic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/panic.c b/kernel/panic.c
index 8136ad7..774614f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -142,7 +142,8 @@ void panic(const char *fmt, ...)
* Note: since some panic_notifiers can make crashed kernel
* more unstable, it can increase risks of the kdump failure too.
*/
- crash_kexec(NULL);
+ if (crash_kexec_post_notifiers)
+ crash_kexec(NULL);
bust_spinlocks(0);
More information about the kexec
mailing list