Browse Source

[PATCH] i386: Terminate backtrace fallback early if unwinder stack pointer is zero

Cc: jbeulich@novell.com
Signed-off-by: Andi Kleen <ak@suse.de>
Andi Kleen 18 years ago
parent
commit
950fee8455
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/i386/kernel/traps.c

+ 2 - 0
arch/i386/kernel/traps.c

@@ -197,6 +197,8 @@ void dump_trace(struct task_struct *task, struct pt_regs *regs,
 				if (UNW_SP(&info) >= PAGE_OFFSET) {
 				if (UNW_SP(&info) >= PAGE_OFFSET) {
 					ops->warning(data, "Leftover inexact backtrace:\n");
 					ops->warning(data, "Leftover inexact backtrace:\n");
 					stack = (void *)UNW_SP(&info);
 					stack = (void *)UNW_SP(&info);
+					if (!stack)
+						return;
 				} else
 				} else
 					ops->warning(data, "Full inexact backtrace again:\n");
 					ops->warning(data, "Full inexact backtrace again:\n");
 			} else if (call_trace >= 1)
 			} else if (call_trace >= 1)