tty: tty_io: use console_list_lock for list synchronization
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:45 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:02 +0000 (11:25 +0100)
commit7c2af0f634f1bc761ca827310dc7e8e586af502f
tree02cf4fbe0f84214aa148c8acc27ef47ac49de535
parent6f8836756f3cbb02bfd1f0e033516585250318a9
tty: tty_io: use console_list_lock for list synchronization

show_cons_active() uses the console_lock to gather information
on registered consoles. It requires that no consoles are unregistered
until it is finished. The console_list_lock should be used because
list synchronization responsibility will be removed from the
console_lock in a later change.

Note, the console_lock is still needed to serialize the device()
callback with other console operations.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221116162152.193147-34-john.ogness@linutronix.de
drivers/tty/tty_io.c