public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] kernel/panic: Show the stacktrace after additional notifier messages
@ 2018-09-03 13:17 Chris Wilson
  2018-09-03 13:52 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2018-09-03 13:17 UTC (permalink / raw)
  To: intel-gfx; +Cc: martin.peres

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.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 kernel/panic.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 8b2e002d52eb..c0334516cb15 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -176,13 +176,6 @@ void panic(const char *fmt, ...)
 	vsnprintf(buf, sizeof(buf), fmt, args);
 	va_end(args);
 	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 we have crashed and we have a crash kernel loaded let it handle
@@ -217,6 +210,14 @@ void panic(const char *fmt, ...)
 	 */
 	atomic_notifier_call_chain(&panic_notifier_list, 0, 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
+
 	/* Call flush even twice. It tries harder with a single online CPU */
 	printk_safe_flush_on_panic();
 	kmsg_dump(KMSG_DUMP_PANIC);
-- 
2.19.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-09-04  8:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-03 13:17 [PATCH] kernel/panic: Show the stacktrace after additional notifier messages Chris Wilson
2018-09-03 13:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-09-03 19:46 ` ✓ Fi.CI.IGT: " Patchwork
2018-09-04  8:55 ` [PATCH] " Martin Peres
2018-09-04  8:58   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox