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

From: Sergey Senozhatsky
Date: Tue Jul 11 2023 - 11:09:27 EST


On (23/07/10 15:51), John Ogness wrote:
[..]
> @@ -2623,8 +2647,6 @@ void console_lock(void)
> msleep(1000);
>
> down_console_sem();
> - if (console_suspended)
> - return;
> console_locked = 1;
> console_may_schedule = 1;
> }
> @@ -2645,10 +2667,6 @@ int console_trylock(void)
> return 0;
> if (down_trylock_console_sem())
> return 0;
> - if (console_suspended) {
> - up_console_sem();
> - return 0;
> - }
> console_locked = 1;
> console_may_schedule = 0;
> return 1;

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?