tty: serial: kgdboc: document console_lock usage
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 16 Nov 2022 16:21:20 +0000 (17:27 +0106)
committerPetr Mladek <pmladek@suse.com>
Fri, 2 Dec 2022 10:25:00 +0000 (11:25 +0100)
commit0fb413ea64603a71e19b4b15a6c5b704e3897d06
treeddf789a84cf447301b08bab6c1842e69c87d9666
parent3860e7c57fd23e744e045436f9872fb9d01381e2
tty: serial: kgdboc: document console_lock usage

kgdboc_earlycon_init() uses the console_lock to ensure that no consoles
are unregistered until the kgdboc_earlycon is setup. This is necessary
because the trapping of the exit() callback assumes that the exit()
callback is not called before the trap is setup.

Explicitly document this non-typical console_lock usage.

Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
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-9-john.ogness@linutronix.de
drivers/tty/serial/kgdboc.c