Skip to content
Snippets Groups Projects
Commit cd67e8ad authored by Chris Wilson's avatar Chris Wilson :thinking: Committed by Lucas De Marchi
Browse files

kernel/panic: Show the stacktrace after additional notifier messages

Most systems keep the last messages from the panic, and we value the
stacktrace most, so dump it last in order to preserve it for
post-mortems.

References: https://gitlab.freedesktop.org/drm/intel/-/issues/8030


Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Acked-by: default avatarMartin Peres <martin.peres@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180903131745.30593-1-chris@chris-wilson.co.uk


Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 3fee0290
No related branches found
No related tags found
No related merge requests found
...@@ -346,13 +346,6 @@ void panic(const char *fmt, ...) ...@@ -346,13 +346,6 @@ void panic(const char *fmt, ...)
buf[len - 1] = '\0'; buf[len - 1] = '\0';
pr_emerg("Kernel panic - not syncing: %s\n", buf); pr_emerg("Kernel panic - not syncing: %s\n", buf);
#ifdef CONFIG_DEBUG_BUGVERBOSE
/*
* Avoid nested stack-dumping if a panic occurs during oops processing
*/
if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
dump_stack();
#endif
/* /*
* If kgdb is enabled, give it a chance to run before we stop all * If kgdb is enabled, give it a chance to run before we stop all
...@@ -384,6 +377,14 @@ void panic(const char *fmt, ...) ...@@ -384,6 +377,14 @@ void panic(const char *fmt, ...)
panic_print_sys_info(false); panic_print_sys_info(false);
#ifdef CONFIG_DEBUG_BUGVERBOSE
/*
* Avoid nested stack-dumping if a panic occurs during oops processing
*/
if (!test_taint(TAINT_DIE) && oops_in_progress <= 1)
dump_stack();
#endif
kmsg_dump_desc(KMSG_DUMP_PANIC, buf); kmsg_dump_desc(KMSG_DUMP_PANIC, buf);
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment