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>
This commit is contained in:
parent
21db79e8bb
commit
c025311596
|
@ -34,9 +34,7 @@
|
||||||
#include <linux/edd.h>
|
#include <linux/edd.h>
|
||||||
#include <linux/frame.h>
|
#include <linux/frame.h>
|
||||||
|
|
||||||
#ifdef CONFIG_KEXEC_CORE
|
|
||||||
#include <linux/kexec.h>
|
#include <linux/kexec.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <xen/xen.h>
|
#include <xen/xen.h>
|
||||||
#include <xen/events.h>
|
#include <xen/events.h>
|
||||||
|
@ -1334,7 +1332,8 @@ static void xen_crash_shutdown(struct pt_regs *regs)
|
||||||
static int
|
static int
|
||||||
xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
|
xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
|
||||||
{
|
{
|
||||||
xen_reboot(SHUTDOWN_crash);
|
if (!kexec_crash_loaded())
|
||||||
|
xen_reboot(SHUTDOWN_crash);
|
||||||
return NOTIFY_DONE;
|
return NOTIFY_DONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue