public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Michael Kelley <mhklinux@outlook.com>,
	Toshiyuki Sato <fj6611ie@fujitsu.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH printk v1] printk: nbcon: Allow reacquire during panic
Date: Tue, 10 Jun 2025 11:15:35 +0200	[thread overview]
Message-ID: <aEf3t7Z4z3g7mHdg@pathway.suse.cz> (raw)
In-Reply-To: <20250606185549.900611-1-john.ogness@linutronix.de>

On Fri 2025-06-06 21:01:49, John Ogness wrote:
> If a console printer is interrupted during panic, it will never
> be able to reacquire ownership in order to perform and cleanup.
> That in itself is not a problem, since the non-panic CPU will
> simply quiesce in an endless loop within nbcon_reacquire_nobuf().
> 
> However, in this state, platforms that do not support a true NMI
> to interrupt the quiesced CPU will not be able to shutdown that
> CPU from within panic(). This then causes problems for such as
> being unable to load and run a kdump kernel.
> 
> Fix this by allowing non-panic CPUs to reacquire ownership using
> a direct acquire. Then the non-panic CPUs can successfullyl exit
> the nbcon_reacquire_nobuf() loop and the console driver can
> perform any necessary cleanup. But more importantly, the CPU is
> no longer quiesced and is free to process any interrupts
> necessary for panic() to shutdown the CPU.
> 
> All other forms of acquire are still not allowed for non-panic
> CPUs since it is safer to have them avoid gaining console
> ownership that is not strictly necessary.
> 
> Reported-by: Michael Kelley <mhklinux@outlook.com>
> Closes: https://lore.kernel.org/r/SN6PR02MB4157A4C5E8CB219A75263A17D46DA@SN6PR02MB4157.namprd02.prod.outlook.com
> Signed-off-by: John Ogness <john.ogness@linutronix.de>

The patch looks good to me:

Reviewed-by: Petr Mladek <pmladek@suse.com>

I am going to wait few days for a potential feedback and then
queue it for 6.17 unless anyone complains.

Best Regards,
Petr

  parent reply	other threads:[~2025-06-10 10:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06 18:55 [PATCH printk v1] printk: nbcon: Allow reacquire during panic John Ogness
2025-06-10  0:10 ` Michael Kelley
2025-06-10  9:15 ` Petr Mladek [this message]
2025-06-17 10:31 ` 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=aEf3t7Z4z3g7mHdg@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=fj6611ie@fujitsu.com \
    --cc=john.ogness@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhklinux@outlook.com \
    --cc=rostedt@goodmis.org \
    --cc=senozhatsky@chromium.org \
    /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