Re: [PATCH] printk: CON_PRINTBUFFER console registration is a bit racy

From: Steven Rostedt
Date: Thu Sep 27 2018 - 06:02:19 EST


On Wed, 26 Sep 2018 13:37:15 +0200
Petr Mladek <pmladek@xxxxxxxx> wrote:

> If you really want this change, please add a comment, for example:
>
> /*
> * Set exclusive_console still with disabled interrupts to
> * reduce race window with eventual console_flush_on_panic()
> * that ignores console_lock.
> */
>
> I am not against the change. It makes some sense and it does
> not break anything. It is just not obvious and might either
> get easily lost again or it might cause confusion. I mean that
> it might cause false feeling that exclusive_console is
> synchronized by logbuf_lock.
>
> printk code already is complex enough without this subtle
> tricks.

I'm fine with the change and agree that a comment should be added.

-- Steve