public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>, takakura@valinux.co.jp
Cc: rostedt@goodmis.org, senozhatsky@chromium.org,
	akpm@linux-foundation.org, bhe@redhat.com, lukas@wunner.de,
	wangkefeng.wang@huawei.com, ubizjak@gmail.com,
	feng.tang@intel.com, j.granados@samsung.com,
	stephen.s.brennan@oracle.com, linux-kernel@vger.kernel.org,
	nishimura@valinux.co.jp, taka@valinux.co.jp
Subject: Re: [PATCH v2 1/2] Handle flushing of CPU backtraces during panic
Date: Mon, 05 Aug 2024 16:14:06 +0206	[thread overview]
Message-ID: <87r0b32hbt.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <ZrDYfU6SVrR2Hj02@pathway.suse.cz>

On 2024-08-05, Petr Mladek <pmladek@suse.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

  reply	other threads:[~2024-08-05 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-03  8:04 [PATCH v2 0/2] printk: CPU backtrace not printing on panic takakura
2024-08-03  8:12 ` [PATCH v2 1/2] Handle flushing of CPU backtraces during panic takakura
2024-08-05 13:49   ` Petr Mladek
2024-08-05 14:08     ` John Ogness [this message]
2024-08-07  8:56     ` takakura
2024-08-05 14:04   ` John Ogness
2024-08-07  8:59     ` takakura
2024-08-03  8:16 ` [PATCH v2 2/2] Allow cpu backtraces to be written into ringbuffer " takakura
2024-08-05 13:51   ` Petr Mladek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r0b32hbt.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=bhe@redhat.com \
    --cc=feng.tang@intel.com \
    --cc=j.granados@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=nishimura@valinux.co.jp \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    --cc=stephen.s.brennan@oracle.com \
    --cc=taka@valinux.co.jp \
    --cc=takakura@valinux.co.jp \
    --cc=ubizjak@gmail.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox