lkml.org 
[lkml]   [2022]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH printk v3 15/15] printk: remove @console_locked
On Wed 2022-04-20 01:52:37, John Ogness wrote:
> The static global variable @console_locked is used to help debug
> VT code to make sure that certain code paths are running with
> the console_lock held. However, this information is also available
> with the static global variable @console_kthreads_blocked (for
> locking via console_lock()), and the static global variable
> @console_kthreads_active (for locking via console_trylock()).
>
> Remove @console_locked and update is_console_locked() to use the
> alternative variables.
>
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2705,13 +2696,11 @@ void console_lock_single_hold(struct console *con)
> might_sleep();
> down_console_sem();
> mutex_lock(&con->lock);
> - console_locked = 1;

is_console_locked() is not able to detect that a given console
is locked by console_lock_single_hold().

> console_may_schedule = 1;
> }
>

Best Regards,
Petr

\
 
 \ /
  Last update: 2022-04-21 14:46    [W:0.178 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site