lkml.org 
[lkml]   [2018]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC][PATCH 0/6] Use printk_safe context for TTY and UART port locks
On Wed, Jun 20, 2018 at 11:34 AM Steven Rostedt <rostedt@goodmis.org> wrote:
>
> Perhaps we should do an audit of the console drivers and remove all
> printk, pr_* , WARN*, BUG* from them.

Only the actual _printing_ parts.

Just randomly, look at drivers/tty/vt/vt.c that does a lot of
printing, and there's a lot of valid printing. Things like

pr_warn("Unable to create device for %s; errno = %ld\n", ..

is fine - it's done at console registration time if things go sideways.

But there are a few commented-out calls to "printk()" that are
obviously bogus, because they are in the printing path.

And they damn well should be commented out. The existence of something
like that SHOULD ABSOLUTELY NOT be seen as a "hey, let's make up some
crazy garbage locking ruls that would allow printing there".

Just don't do it. It's that simple.

Linus

\
 
 \ /
  Last update: 2018-06-20 04:45    [W:0.110 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site