[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87r0b32hbt.fsf@jogness.linutronix.de>
Date: Mon, 05 Aug 2024 16:14:06 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>, takakura@...inux.co.jp
Cc: rostedt@...dmis.org, senozhatsky@...omium.org,
akpm@...ux-foundation.org, bhe@...hat.com, lukas@...ner.de,
wangkefeng.wang@...wei.com, ubizjak@...il.com, feng.tang@...el.com,
j.granados@...sung.com, stephen.s.brennan@...cle.com,
linux-kernel@...r.kernel.org, nishimura@...inux.co.jp, taka@...inux.co.jp
Subject: Re: [PATCH v2 1/2] Handle flushing of CPU backtraces during panic
On 2024-08-05, Petr Mladek <pmladek@...e.com> wrote:
>> diff --git a/kernel/panic.c b/kernel/panic.c
>> index 7e2070925..f94923a63 100644
>> --- a/kernel/panic.c
>> +++ b/kernel/panic.c
>> @@ -252,8 +252,10 @@ void check_panic_on_warn(const char *origin)
>> */
>> static void panic_other_cpus_shutdown(bool crash_kexec)
>> {
>> - if (panic_print & PANIC_PRINT_ALL_CPU_BT)
>> + if (panic_print & PANIC_PRINT_ALL_CPU_BT) {
>> trigger_all_cpu_backtrace();
>> + console_flush_on_panic(CONSOLE_FLUSH_PENDING);
>
> Hmm, this is too dangerous.
>
> console_flush_on_panic() is supposed to be called at the end on
> panic() as the final desperate attempt to flush consoles.
Thanks for catching this. I keep forgetting that
console_flush_on_panic() is the legacy variant of
nbcon_atomic_flush_unsafe(), but is called much earlier.
John
Powered by blists - more mailing lists