[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFFEH4urEYEx5IpI@pathway.suse.cz>
Date: Tue, 17 Jun 2025 12:31:59 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Michael Kelley <mhklinux@...look.com>,
Toshiyuki Sato <fj6611ie@...itsu.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH printk v1] printk: nbcon: Allow reacquire during panic
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@...look.com>
> Closes: https://lore.kernel.org/r/SN6PR02MB4157A4C5E8CB219A75263A17D46DA@SN6PR02MB4157.namprd02.prod.outlook.com
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
JFYI, the patch has been committed into printk/linux.git,
branch rework/fixes. It is intended for the next 6.17 merge window.
Best Regards,
Petr
Powered by blists - more mailing lists