Skip to content
  • Hidehiro Kawai's avatar
    x86/panic: replace smp_send_stop() with kdump friendly version in panic path · 0ee59413
    Hidehiro Kawai authored
    Daniel Walker reported problems which happens when
    crash_kexec_post_notifiers kernel option is enabled
    In that case, smp_send_stop() is called before entering kdump routines
    which assume other CPUs are still online.  As the result, for x86, kdump
    routines fail to save other CPUs' registers and disable virtualization
    To fix this problem, call a new kdump friendly function,
    crash_smp_send_stop(), instead of the smp_send_stop() when
    crash_kexec_post_notifiers is enabled.  crash_smp_send_stop() is a weak
    function, and it just call smp_send_stop().  Architecture codes should
    override it so that kdump can work appropriately.  This patch only
    provides x86-specific version.
    For Xen's PV kernel, just keep the current behavior.
    - Right solution would be to place crash_smp_send_stop() before
      __crash_kexec() invocation in all cases and remove smp_send_stop(), but
      we can't do that until all architectures implement own
    - crash_smp_send_stop()-like work is still needed by
      machine_crash_shutdown() because crash_kexec() can be called without
      entering panic()
    Fixes: f06e5153 (kernel/panic.c: add "crash_kexec_post_notifiers" option)
    Signed-off-by: default avatarHidehiro Kawai <>
    Reported-by: default avatarDaniel Walker <>
    Cc: Dave Young <>
    Cc: Baoquan He <>
    Cc: Vivek Goyal <>
    Cc: Eric Biederman <>
    Cc: Masami Hiramatsu <>
    Cc: Daniel Walker <>
    Cc: Xunlei Pang <>
    Cc: Thomas Gleixner <>
    Cc: Ingo Molnar <>
    Cc: "H. Peter Anvin" <>
    Cc: Borislav Petkov <>
    Cc: David Vrabel <>
    Cc: Toshi Kani <>
    Cc: Ralf Baechle <>
    Cc: David Daney <>
    Cc: Aaro Koskinen <>
    Cc: "Steven J. Hill" <>
    Cc: Corey Minyard <>
    Signed-off-by: default avatarAndrew Morton <>
    Signed-off-by: default avatarLinus Torvalds <>