summaryrefslogtreecommitdiff
path: root/kernel/panic.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/panic.c')
-rw-r--r--kernel/panic.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/kernel/panic.c b/kernel/panic.c
index a3308af28a21..6718f8e5a2dd 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -266,13 +266,6 @@ void panic(const char *fmt, ...)
buf[len - 1] = '\0';
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
@@ -315,6 +308,14 @@ void panic(const char *fmt, ...)
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(KMSG_DUMP_PANIC);
/*