[Crash-utility] [PATCH] ppc64: fix bt for secondary threads for NMI IPIs

Hari Bathini hbathini at linux.vnet.ibm.com
Wed Dec 13 15:44:23 UTC 2017


With latest NMI IPI changes, crash_ipi_callback is found multiple times
on the stack. Ensure the chosen symbol relates to an actual backtrace.

Signed-off-by: Hari Bathini <hbathini at linux.vnet.ibm.com>
---
 ppc64.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/ppc64.c b/ppc64.c
index 672ee60..0b04187 100644
--- a/ppc64.c
+++ b/ppc64.c
@@ -2337,6 +2337,14 @@ retry:
                         *nip = *up;
                         *ksp = bt->stackbase + 
 				((char *)(up) - 16 - bt->stackbuf);
+			/*
+			 * Check whether this symbol relates to a
+			 * backtrace or not
+			 */
+			ur_ksp =  *(ulong *)&bt->stackbuf[(*ksp) - bt->stackbase];
+			if (!INSTACK(ur_ksp, bt))
+				continue;
+
                         return TRUE;
                 }
 	}




More information about the Crash-utility mailing list