Re: [PATCH v2 1/2] printk: introduce dump_stack_lvl()

From: Andrew Morton
Date: Sat May 08 2021 - 20:52:59 EST


On Thu, 6 May 2021 12:54:04 +0200 Alexander Potapenko <glider@xxxxxxxxxx> wrote:

> dump_stack() is used for many different cases, which may require a log
> level consistent with other kernel messages surrounding the dump_stack()
> call.
> Without that, certain systems that are configured to ignore the default
> level messages will miss stack traces in critical error reports.
>
> This patch introduces dump_stack_lvl() that behaves similarly to
> dump_stack(), but accepts a custom log level.
> The old dump_stack() becomes equal to dump_stack_lvl(KERN_DEFAULT).
>
> A somewhat similar patch has been proposed in 2012:
> https://lore.kernel.org/lkml/1332493269.2359.9.camel@hebo/
> , but wasn't merged.

Um yeah, I dropped the ball on that one, didn't I? I suspect pretty
much all dump_stack() callsites should be using this.