lkml.org 
[lkml]   [2017]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv7 4/8] printk: always use deferred printk when flush printk_safe lines
On (02/01/17 11:06), Steven Rostedt wrote:
[..]
> > static void printk_safe_flush_line(const char *text, int len)
> > {
> > /*
> > - * The buffers are flushed in NMI only on panic. The messages must
> > - * go only into the ring buffer at this stage. Consoles will get
> > - * explicitly called later when a crashdump is not generated.
> > + * Avoid any console drivers calls from here, because we may be
> > + * in NMI or printk_safe context (when in panic). The messages
> > + * must go only into the ring buffer at this stage. Consoles will
> > + * get explicitly called later when a crashdump is not generated.
> > */
> > - if (in_nmi())
> > - printk_deferred("%.*s", len, text);
> > - else
> > - printk("%.*s", len, text);
> > + printk_deferred("%.*s", len, text);
> > }
>
> The helper function was there because of the if statement. Just nuke
> this function and call printk_deferred() directly. You can move the
> comment to the caller.

indeed. thanks.

Petr, how would you prefer to handle this?

-ss

\
 
 \ /
  Last update: 2017-02-02 07:05    [W:0.091 / U:3.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site