Re: [PATCH v4 1/4] panic: Add a platform panic notifier list

From: Petr Mladek

Date: Fri Nov 20 2026 - 03:36:50 EST


On Wed 2026-11-18 01:01:48, Zack Rusin wrote:
> Some platforms set crash_kexec_post_notifiers so their crash handlers
> run before kdump. That also runs every other panic notifier and kmsg
> dumper before the crash kernel.
>
> Add panic_notifiers_platform_list for platform callbacks that need to
> run early and are safe while other CPUs are still running. Call it
> from vpanic() before kdump and before stopping the other CPUs,
> independently of crash_kexec_post_notifiers.
>
> Also call it from __crash_kexec() if a crash kernel is loaded, since a
> fatal oops can enter kdump without panic(). Call it before taking the
> kexec lock, so a callback that panics can still enter kdump. Run the
> list at most once, including when a callback panics.
>
> Add disable_panic_notifiers_platform_list to skip these callbacks
> when debugging panic or kdump failures.
>
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Link: https://lore.kernel.org/r/ateYxCu63pRY9EGq@xxxxxxxxxxxxxxx
> Signed-off-by: Zack Rusin <zack.rusin@xxxxxxxxxxxx>

JFYI, it looks reasonable from my POV:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr