On Wed, Jun 20, 2018 at 11:34 AM Steven Rostedt <rost...@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

Reply via email to