Messages in this thread | | | Date | Tue, 15 Nov 2022 13:26:59 +0100 | From | Petr Mladek <> | Subject | Re: [PATCH printk v4 11/39] console: introduce wrappers to read/write console flags |
| |
On Mon 2022-11-14 17:35:04, John Ogness wrote: > After switching to SRCU for console list iteration, some readers > will begin readings console->flags as a data race. Locklessly > reading console->flags provides a consistent value because there > is at most one CPU modifying console->flags and that CPU is > using only read-modify-write operations. > > Introduce a wrapper for SRCU iterators to read console flags. > Introduce a matching wrapper to write to flags of registered > consoles. Writing to flags of registered consoles is synchronized > by the console_list_lock. > > Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Best Regards, Petr
| |