]> Git Repo - linux.git/commit
tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console()
authorJohn Ogness <[email protected]>
Wed, 16 Nov 2022 16:21:49 +0000 (17:27 +0106)
committerPetr Mladek <[email protected]>
Fri, 2 Dec 2022 10:25:02 +0000 (11:25 +0100)
commit6193bc90849a711e3b67bc6051e1bb0254c51f2a
tree666d32c46e5bd5bf9279530fd616d62c15a9e729
parent66857443699b34c8c5951dd421f1c528c9554bb5
tty: serial: kgdboc: synchronize tty_find_polling_driver() and register_console()

Calling tty_find_polling_driver() can lead to uart_set_options() being
called (via the poll_init() callback of tty_operations) to configure the
uart. But uart_set_options() can also be called by register_console()
(via the setup() callback of console).

Take the console_list_lock to synchronize against register_console() and
also use it for console list traversal. This also ensures the console list
cannot change until the polling console has been chosen.

Signed-off-by: John Ogness <[email protected]>
Reviewed-by: Daniel Thompson <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Petr Mladek <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
drivers/tty/serial/kgdboc.c
This page took 0.055104 seconds and 4 git commands to generate.