[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yy7OfxGA//d8QYpe@google.com>
Date: Sat, 24 Sep 2022 18:31:43 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: John Ogness <john.ogness@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <senozhatsky@...omium.org>,
Steven Rostedt <rostedt@...dmis.org>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH printk 06/18] printk: Protect [un]register_console() with
a mutex
On (22/09/24 02:10), John Ogness wrote:
> From: Thomas Gleixner <tglx@...utronix.de>
>
> Unprotected list walks are a brilliant idea. Especially in the context of
> hotpluggable consoles.
>
> The new list lock provides not only synchronization for console list
> manipulation, but also for manipulation of console->flags:
>
> console_list_lock();
> console_lock();
>
> /* may now manipulate the console list and/or console->flags */
>
> console_unlock();
> console_list_unlock();
>
> Therefore it is safe to iterate the console list and read console->flags
> if holding either the console lock or the console list lock.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: John Ogness <john.ogness@...utronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
Powered by blists - more mailing lists