Re: [PATCH printk v2 05/18] printk: Atomic print in printk context on shutdown

From: Petr Mladek
Date: Thu Jun 13 2024 - 08:33:16 EST


On Tue 2024-06-04 01:30:40, John Ogness wrote:
> For nbcon consoles, normally the printing is handled by the
> dedicated console printing threads. However, on shutdown the
> printing threads may not get a chance to print the final
> messages.
>
> When shutting down or rebooting (system_state > SYSTEM_RUNNING),
> perform atomic printing from the printk() caller context.
>
> Signed-off-by: John Ogness <john.ogness@xxxxxxxxxxxxx>

Sigh, the checks/logic gets really complicated. But I can't think
of anything better at the moment. And it seems that the check for
the system state is added at the right locations.

Reviewed-by: Petr Mladek <pmladek@xxxxxxxx>

Best Regards,
Petr