Re: [RFC PATCH v1] panic: Flush unsafe consoles before panic reboot
From: Bradley Morgan
Date: Wed Sep 16 2026 - 11:40:16 EST
On 16 September 2026 08:44:53 BST, Ryan Roberts <ryan.roberts@xxxxxxx>
wrote:
>On 15/09/2026 19:49, Bradley Morgan wrote:
>> Hey, I think thisll conflict with the arch_do_panic() patch
>(b45d6e4b3580)
>
>Ahh I see it here:
>https://lore.kernel.org/all/20260831-arch_do_panic-v6-0-a1e170a9e7fd@xxxxxxxxxxxxx/
>
>And looks like it's in Andrew's mm-nonmm-unstable branch. I guess I should
>repost based on that branch?
Yes.
(That branch also goes to linux-next)
>
>>
>> Once you rebase. I'd reckon the
>> change shrinks to just moving the panic_timeout != 0 block below
>> nbcon_atomic_flush_unsafe().
>
>I think I'll also want to make the call to arch_do_panic() conditional on
>(panic_timeout == 0) so it's equivalent to the patch I sent?
>
>>
>> On your RFC question, whether the current behavior is deliberate: I
>> don't think it is. nbcon_atomic_flush_unsafe() was placed at the end of
>> vpanic() by 5dde3b735413 as a final attempt to flush pending messages,
>and
>> at
>> that point no console was actually CON_NBCON_ATOMIC_UNSAFE, netconsole
>> was still legacy. There was nothing to lose by putting it last. The
>> ordering only became a bug once the first unsafe console showed up.
>> John and Petr can confirm, but I found no sign anyone chose this.
>
>OK great; I'll wait a few days for others to chime in, otherwise I'll plan
>to
>repost based on mm-nonmm-unstable, dropping the RFC tag.
>
>Thanks,
>Ryan
>
>
>>
>>
>> --- Thanks!
>>
>https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@xxxxxxxxx/
>
--- Thanks!
https://lore.kernel.org/all/EE579805-42F2-4C58-B752-F28779EEB717@xxxxxxxxx/