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 2807639aab51..d065b82fd42f 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -336,13 +336,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
@@ -372,6 +365,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);
/*