Re: [PATCH] printk: save loglevel before console_verbose()

From: John Ogness
Date: Fri Feb 16 2024 - 04:23:14 EST


On 2024-02-15, Stephen Brennan <stephen.s.brennan@xxxxxxxxxx> wrote:
> In panic() cases, console_verbose() is called, clobbering the
> console_loglevel value. If the bug which led to the panic related to
> printk, it can be useful to know the log level prior to the
> console_verbose() call.

I've done a *lot* of printk debugging over the past 6 years and have
never had a case where this would be useful (or even interesting).

I assume there is some rare and particular scenario you are trying to
debug. And once you've debugged it, it is no longer useful for you
either.

IMHO this does not warrant adding an extra global variable for all Linux
users.

When Petr gets back from vacation, maybe he will have a different
opinion.

John Ogness