From: Petr Mladek <pmladek@suse.com>
To: John Ogness <john.ogness@linutronix.de>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Steven Rostedt <rostedt@goodmis.org>,
Pavel Tikhomirov <ptikhomirov@virtuozzo.com>,
Oleg Nesterov <oleg@redhat.com>,
Christian Brauner <brauner@kernel.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
oe-lkp@lists.linux.dev, lkp@intel.com,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] nbcon/reboot: Switch NBCON consoles into the emergency mode in emergency_restart()
Date: Wed, 14 Oct 2026 11:58:45 +0200 [thread overview]
Message-ID: <as9SVaRU7mEvcsVe@pathway.suse.cz> (raw)
In-Reply-To: <20261013154141.94016-1-pmladek@suse.com>
On Tue 2026-10-13 17:41:41, Petr Mladek wrote:
> When the system is going down a normal way, the NBCON kthreads are
> flushed and stopped properly via a syscore shutdown callback, see
> printk_kthreads_shutdown().
>
> One missing piece is emergency_restart() where the kthreads are not
> stopped. It might be called from several non-panic code paths,
> e.g. sysrq-o, kdb_reboot(), or some watchdogs.
>
> Fix it by explicitly entering the emergency (atomic) mode and trying
> to flush the consoles there.
>
> Note that printk_trigger_flush() must be used instead of pr_flush()
> because the later is not safe in an atomic context.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/all/202608061008.48a1e76e-lkp@intel.com/
> Suggested-by: John Ogness <john.ogness@linutronix.de>
> Signed-off-by: Petr Mladek <pmladek@suse.com>
JFYI, the patch has been committed into printk/linux.git,
branch for-7.3-hotfix.
I am going to give it a spin in linux-next and send a pull
request on Friday unless any blocker appears in the meantime.
Best Regards,
Petr
prev parent reply other threads:[~2026-10-14 9:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 15:41 [PATCH v2] nbcon/reboot: Switch NBCON consoles into the emergency mode in emergency_restart() Petr Mladek
2026-10-13 15:54 ` sashiko-bot
2026-10-13 16:09 ` John Ogness
2026-10-14 9:58 ` Petr Mladek [this message]
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=as9SVaRU7mEvcsVe@pathway.suse.cz \
--to=pmladek@suse.com \
--cc=bigeasy@linutronix.de \
--cc=brauner@kernel.org \
--cc=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oleg@redhat.com \
--cc=ptikhomirov@virtuozzo.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;
as well as URLs for NNTP newsgroup(s).