Re: linux.git: printk() problem

From: Sergey Senozhatsky
Date: Mon Oct 24 2016 - 10:10:25 EST


Hello,

thanks for Cc-ing.

On (10/23/16 12:46), Linus Torvalds wrote:
> +static void deferred_cont_flush(void)
> +{
> + static DEFINE_TIMER(timer, flush_timer, 0, 0);
> +
> + if (!cont.len)
> return;
> + mod_timer(&timer, jiffies + HZ/10);
> }

[..]

> @@ -2360,6 +2285,8 @@ void console_unlock(void)
> return;
> }
>
> + deferred_cont_flush();
> +

is mod_timer() safe enough to rely on/call from
panic()->console_flush_on_panic()->console_unlock() ?

shouldn't deferred_cont_flush() be called every time we jump
to `again' label in console_unlock()?

timer has debug object support, which probably can printk(), but
that shouldn't cause any troubles, I suppose.

-ss