Re: [PATCH v7 6/6] panic: kill the "buffer unavailable" redirect fallback

From: Petr Mladek

Date: Tue Sep 22 2026 - 08:39:00 EST


On Wed 2026-09-16 18:29:57, Bradley Morgan wrote:
> The redirect buffer is a disgusting terrible hack. panic_force_buf is
> kmalloc'ed in a late_initcall, and until then the redirect delivers
> this as the panic message:
>
> Redirected panic (buffer unavailable)
>
> The whole point of the redirect is to hand the panic message to the
> target CPU, so the crash kernel boots knowing it panicked and not why.
> And that window is the entire boot, from the early_param to the
> late_initcall, which is exactly when you most want the message.
>
> Make it a static 1KB buffer and kill the initcall. The cost is 1KB of
> .bss in SMP crash dump builds, and it is only ever touched when
> panic_force_cpu= is set anyway. The local msg variable is gone too,
> the buffer goes directly to panic_smp_redirect_cpu().
>
> Suggested-by: Petr Mladek <pmladek@xxxxxxxx>
> Signed-off-by: Bradley Morgan <brads@xxxxxxxxxxxxxx>

Look good to me:

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr