Re: [PATCH v5 11/16] console/braille: Lock console->setup() call during the registration

From: Chris Down

Date: Thu Oct 29 2026 - 03:15:36 EST


Petr Mladek writes:
>In braille_register_console(), the console->setup() callback must be
>called while holding the console_lock. This prevents a race condition
>with a possible active boot console that might be using the same hardware
>registers.

Acked-by: Chris Down <chris@xxxxxxxxxxxxxx>

>index d780f6de303a..11d6b854ee63 100644
>--- a/include/linux/console.h
>+++ b/include/linux/console.h
>@@ -699,6 +699,7 @@ enum con_flush_mode {
> };
>
> extern int add_preferred_console(const char *name, const short idx, char *options);
>+extern int console_call_setup(struct console *newcon, char *options);

Hmm, now that console_call_setup() is global, a short comment saying it is only
meant for the Braille driver might discourage other users if you want. But not
a big deal either way.