[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YLZDd+Jo42yBWa9L@alley>
Date: Tue, 1 Jun 2021 16:25:59 +0200
From: Petr Mladek <pmladek@...e.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
"Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [PATCH next v1 2/2] nmi_backtrace: use the printk cpu lock for
show_regs()
On Mon 2021-05-31 18:20:51, John Ogness wrote:
> dump_stack() uses the printk cpu lock to synchronize the stacktrace,
> but this can also be used for dumping the banner and regs.
>
> Since the cpu lock allows recursive locking, it is not an issue to
> call dump_stack() with the printk cpu lock held.
This does not explain why it is serialized only in nmi_cpu_backtrace().
It would be better to serialize all show_regs() calls. But it would
require updating all the arch-specific implementations.
I know that this patch is a pre-requisite for another patchset
removing printk_safe(). Where printk_safe() is serializing
the backtraces from all CPUs at the moment.
IMHO, it is perfectly fine synchronize only nmi_cpu_backtrace() for
now. It is the most important use-case where show_regs() calls could
get messed easily. But I suggest to do it in the patchset removing
printk_safe(). Also we need to explain in the commit message the relation
to printk_safe().
Best Regards,
Petr
Powered by blists - more mailing lists