From: Paul Mundt Date: Fri, 6 Nov 2009 08:23:33 +0000 (+0900) Subject: sh: unwinder: Fix up invalid PC refetch in dwarf unwinder. X-Git-Tag: v2.6.32-rc7~62^2~2 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=421b541110b20ccff1a7ff3245439cb24efe9812;p=~shefty%2Frdma-dev.git sh: unwinder: Fix up invalid PC refetch in dwarf unwinder. The dwarf unwinder presently attempts to provide a sane PC value if none is provided, however the logic is broken and cases where a previous valid dwarf frame exists along with a bogus PC value can still proceed. This fixes up the test and prevents the unwinder from blowing up. Signed-off-by: Paul Mundt --- diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 2d07084e488..d76a23170db 100644 --- a/arch/sh/kernel/dwarf.c +++ b/arch/sh/kernel/dwarf.c @@ -555,7 +555,7 @@ struct dwarf_frame * dwarf_unwind_stack(unsigned long pc, * NOTE: the return address is guaranteed to be setup by the * time this function makes its first function call. */ - if (!pc && !prev) + if (!pc || !prev) pc = (unsigned long)current_text_addr(); #ifdef CONFIG_FUNCTION_GRAPH_TRACER