diff options
author | Petr Tesarik <ptesarik@suse.com> | 2016-08-02 17:06:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-08-02 19:35:30 -0400 |
commit | c0253115968c35f3e1ee497282efb75ccf29fb98 (patch) | |
tree | 790437a982773c2e4d5802b3bb94b2e64e32af0b | |
parent | 21db79e8bb054d0351a6b1b464f1c9c47a2e6e8d (diff) |
kexec: allow kdump with crash_kexec_post_notifiers
If a crash kernel is loaded, do not crash the running domain. This is
needed if the kernel is loaded with crash_kexec_post_notifiers, because
panic notifiers are run before __crash_kexec() in that case, and this
Xen hook prevents its being called later.
[akpm@linux-foundation.org: build fix: unconditionally include kexec.h]
Link: http://lkml.kernel.org/r/20160713122000.14969.99963.stgit@hananiah.suse.cz
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/x86/xen/enlighten.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index cd993051aed7..8ffb089b19a5 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -34,9 +34,7 @@ | |||
34 | #include <linux/edd.h> | 34 | #include <linux/edd.h> |
35 | #include <linux/frame.h> | 35 | #include <linux/frame.h> |
36 | 36 | ||
37 | #ifdef CONFIG_KEXEC_CORE | ||
38 | #include <linux/kexec.h> | 37 | #include <linux/kexec.h> |
39 | #endif | ||
40 | 38 | ||
41 | #include <xen/xen.h> | 39 | #include <xen/xen.h> |
42 | #include <xen/events.h> | 40 | #include <xen/events.h> |
@@ -1334,7 +1332,8 @@ static void xen_crash_shutdown(struct pt_regs *regs) | |||
1334 | static int | 1332 | static int |
1335 | xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) | 1333 | xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr) |
1336 | { | 1334 | { |
1337 | xen_reboot(SHUTDOWN_crash); | 1335 | if (!kexec_crash_loaded()) |
1336 | xen_reboot(SHUTDOWN_crash); | ||
1338 | return NOTIFY_DONE; | 1337 | return NOTIFY_DONE; |
1339 | } | 1338 | } |
1340 | 1339 | ||