projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0fc11e3
)
sh: stacktrace: Add reliability checks in address saving ops.
author
Paul Mundt
<lethal@linux-sh.org>
Fri, 14 Aug 2009 16:05:46 +0000
(
01:05
+0900)
committer
Paul Mundt
<lethal@linux-sh.org>
Fri, 14 Aug 2009 16:05:46 +0000
(
01:05
+0900)
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>
arch/sh/kernel/stacktrace.c
patch
|
blob
|
history
diff --git
a/arch/sh/kernel/stacktrace.c
b/arch/sh/kernel/stacktrace.c
index
45b1add
..
a0f497b
100644
(file)
--- 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;