Skip to content

Commit

Permalink
sh: stacktrace: Add reliability checks in address saving ops.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mundt committed Aug 14, 2009
1 parent 0fc11e3 commit 48e4d46
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/sh/kernel/stacktrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 48e4d46

Please sign in to comment.