[PATCH] Check for end of stack trace before falling back

Signed-off-by: Andi Kleen <ak@suse.de>
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 4ac18b0..28e5334 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -292,6 +292,8 @@
 				if ((long)UNW_SP(&info) < 0) {
 					ops->warning(data, "Leftover inexact backtrace:\n");
 					stack = (unsigned long *)UNW_SP(&info);
+					if (!stack)
+						return;
 				} else
 					ops->warning(data, "Full inexact backtrace again:\n");
 			} else if (call_trace >= 1)