[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8735tiq0d8.fsf@jogness.linutronix.de>
Date: Tue, 15 Jun 2021 23:39:23 +0206
From: John Ogness <john.ogness@...utronix.de>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
Stephen Rothwell <sfr@...b.auug.org.au>,
Andrew Morton <akpm@...ux-foundation.org>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Stephen Boyd <swboyd@...omium.org>,
Alexander Potapenko <glider@...gle.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH next v3 1/2] dump_stack: move cpu lock to printk.c
On 2021-06-15, John Ogness <john.ogness@...utronix.de> wrote:
> diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
> index 114e9963f903..5369d8f33299 100644
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -3532,3 +3532,70 @@ void kmsg_dump_rewind(struct kmsg_dump_iter *iter)
> EXPORT_SYMBOL_GPL(kmsg_dump_rewind);
>
> #endif
> +
> +#ifdef CONFIG_SMP
> +static atomic_t printk_cpulock_owner = ATOMIC_INIT(-1);
> +static bool printk_cpulock_nested;
I just realized that @printk_cpulock_nested will need to be an atomic_t
counter to allow multiple nested levels since nesting can also occur
because of recursion and not only because of an interrupting NMI
context. So a v4 will be needed for that simple change. But please still
comment on the rest.
Thanks.
John Ogness
Powered by blists - more mailing lists