Messages in this thread | | | Date | Sat, 24 Sep 2022 18:31:43 +0900 | From | Sergey Senozhatsky <> | 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@linutronix.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@linutronix.de> > Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
| |