diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-11-06 17:23:33 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-11-06 17:23:33 +0900 |
commit | 421b541110b20ccff1a7ff3245439cb24efe9812 (patch) | |
tree | 1a03b8e813e6e0036b83575c1e92993c838d7155 /arch/sh/kernel | |
parent | 345e5a7672f561b539b3249cbe437b8d6595ab1b (diff) | |
download | blackbird-op-linux-421b541110b20ccff1a7ff3245439cb24efe9812.tar.gz blackbird-op-linux-421b541110b20ccff1a7ff3245439cb24efe9812.zip |
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 <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/dwarf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sh/kernel/dwarf.c b/arch/sh/kernel/dwarf.c index 2d07084e4882..d76a23170dbb 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 |