Re: [PATCH printk v2 4/5] printk: Add per-console suspended state

From: Sergey Senozhatsky
Date: Tue Jul 11 2023 - 11:26:59 EST


On (23/07/11 17:29), John Ogness wrote:
[..]
> > Interesting. console_locked previously would not be set if
> > console is suspended, but now it's always set, which in theory
> > changes the way WARN_CONSOLE_UNLOCKED() macro works in some
> > cases?
>
> Yes, Petr mentioned [0] this during the v1 review. His direct comment:
>
> "console_locked" seems to be used only in WARN_CONSOLE_UNLOCKED().
> I could imagine a corner case where, for example, "vt" code does
> not print the warning because it works as it works. But it does
> not make much sense. IMHO, such a code should get fixed. And it
> is just a warning after all.
>
> And his final comment in that thread:
>
> I believe that @console_suspended is not longer needed.
> Let's replace it with the per-console flag and do not worry
> about races.

Oh, thanks for the pointers!

> [0] https://lore.kernel.org/lkml/ZAieQtcs7YEuCCDa@alley