On (04/01/16 17:00), Petr Mladek wrote:
> You need to move this assigment right above the 
> console_lock()/console_unlock()
> calls. Otherwise, there is a race:
> 
> CPU0:                         CPU1
> 
> printk_kthread_func()
> 
>   console_unlock()
> 
>                               printk()
> 
>                               printk_kthread_need_flush_console = true;
>                               wake_up_process(printk_kthread);
> 
>   printk_kthread_need_flush_console = false;
> 
>   set_current_state(TASK_INTERRUPTIBLE);
>   if (!printk_kthread_need_flush_console)
>     schedule();

thanks. yeah, this can add latency to some messages.

        -ss

Reply via email to