Re: [PATCH 2/2] printk: make sure to print log on console.

From: Petr Mladek
Date: Thu May 31 2018 - 08:21:19 EST


On Thu 2018-05-31 19:52:15, Sergey Senozhatsky wrote:
> On (05/31/18 15:49), Maninder Singh wrote:
> >
> > This patch make sure printing of log if loglevel at time of storing
> > log is greater than current console loglevel.
> >
> > @why
> > In case of async printk, printk thread can miss logs because it checks
> > current log level at time of console_unlock.
>
> Upstream printk has no printing kthread. And we also run
> printk()->console_unlock() with disabled preemption.

Yes, the comment was wrong but the problem is real. The console
handling is asynchronous even without the kthread. The current
console_lock owner is responsible for handling messages also
from other CPUs.

Best Regards,
Petr