]> Git Repo - linux.git/commit - lib/dump_stack.c
printk: introduce dump_stack_lvl()
authorAlexander Potapenko <[email protected]>
Tue, 29 Jun 2021 02:40:30 +0000 (19:40 -0700)
committerLinus Torvalds <[email protected]>
Tue, 29 Jun 2021 17:53:52 +0000 (10:53 -0700)
commit4469c0f17ec63dcc8c9ed512f4330b566c2c0d34
tree79779bd55a7f24824642713cdea71186aeeae507
parenta850e932df657c11f2030920dbda5f5621cef091
printk: introduce dump_stack_lvl()

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.

[[email protected]: add missing dump_stack_lvl() stub if CONFIG_PRINTK=n]
Link: https://lkml.kernel.org/r/[email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alexander Potapenko <[email protected]>
Reviewed-by: Marco Elver <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: he, bo <[email protected]>
Cc: Yanmin Zhang <[email protected]>
Cc: Prasad Sodagudi <[email protected]>
Cc: Dmitry Vyukov <[email protected]>
Cc: Sergey Senozhatsky <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Andrey Ryabinin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/printk.h
lib/dump_stack.c
This page took 0.0583669999999999 seconds and 4 git commands to generate.