[PATCH] ppc64: fix bt for secondary threads for NMI IPIs
by Hari Bathini
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(a)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;
}
}
7 years