Thread (7 messages) flat view 7 messages, 3 authors, 2017-07-05
STALE3339d

[PATCH 1/3] powerpc: do not call ppc_md.panic in panic notifier if fadump not used

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2017-07-04 10:09:32
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

If fadump is not registered, and no other crash or debug handlers are
registered, the powerpc panic handler stops the guest before the generic
panic code can push out debug information to the console.

Without this patch, system reset injection to a guest causes the guest to
silently stop. Afterwards, we get the expected oops trace.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/kernel/setup-common.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 94a948207cd2..39ba09965b04 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -707,12 +707,15 @@ EXPORT_SYMBOL(check_legacy_ioport);
 static int ppc_panic_event(struct notifier_block *this,
                              unsigned long event, void *ptr)
 {
-	/*
-	 * If firmware-assisted dump has been registered then trigger
-	 * firmware-assisted dump and let firmware handle everything else.
-	 */
-	crash_fadump(NULL, ptr);
-	ppc_md.panic(ptr);  /* May not return */
+	if (is_fadump_active()) {
+		/*
+		 * If firmware-assisted dump has been registered then trigger
+		 * firmware-assisted dump and let firmware handle everything
+		 * else.
+		 */
+		crash_fadump(NULL, ptr);
+		ppc_md.panic(ptr);  /* May not return */
+	}
 	return NOTIFY_DONE;
 }
 
-- 
2.11.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help