summaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/stacktrace.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-14 18:05:46 +0200
committerPaul Mundt <lethal@linux-sh.org>2009-08-14 18:05:46 +0200
commit48e4d4604b7da52d6a56ddc821a460b183b7353d (patch)
treef9a7846e5616dc972dcfa6e7d279f28e8178c014 /arch/sh/kernel/stacktrace.c
parentsh: unwinder: Convert frame allocations to GFP_ATOMIC. (diff)
downloadlinux-48e4d4604b7da52d6a56ddc821a460b183b7353d.tar.xz
linux-48e4d4604b7da52d6a56ddc821a460b183b7353d.zip
sh: stacktrace: Add reliability checks in address saving ops.
This adopts the reliability checks from the x86 stacktrace code so known bad addresses are not recorded in the stack trace buffer. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/stacktrace.c')
-rw-r--r--arch/sh/kernel/stacktrace.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/kernel/stacktrace.c b/arch/sh/kernel/stacktrace.c
index 45b1adde3abe..a0f497bcbb4f 100644
--- a/arch/sh/kernel/stacktrace.c
+++ b/arch/sh/kernel/stacktrace.c
@@ -38,6 +38,9 @@ static void save_stack_address(void *data, unsigned long addr, int reliable)
{
struct stack_trace *trace = data;
+ if (!reliable)
+ return;
+
if (trace->skip > 0) {
trace->skip--;
return;
@@ -67,6 +70,9 @@ save_stack_address_nosched(void *data, unsigned long addr, int reliable)
{
struct stack_trace *trace = (struct stack_trace *)data;
+ if (!reliable)
+ return;
+
if (in_sched_functions(addr))
return;