tty: serial: kgdboc: use console_list_lock to trap exit
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:50 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:02 +0000 (11:25 +0100)
commite2b39652283685edd7e84174b10736d79063d399
tree9aab1458229e0c386227dd7341107047d9f6722a
parent6193bc90849a711e3b67bc6051e1bb0254c51f2a
tty: serial: kgdboc: use console_list_lock to trap exit

kgdboc_earlycon_init() uses the console_lock to ensure that no consoles
are unregistered until the kgdboc_earlycon is setup. The console_list_lock
should be used instead because list synchronization responsibility will
be removed from the console_lock in a later change.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
Link: https://lore.kernel.org/r/20221116162152.193147-39-john.ogness@linutronix.de
drivers/tty/serial/kgdboc.c