diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2009-06-26 08:55:51 (GMT) |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-06-26 18:48:39 (GMT) |
commit | a32c7765e2796395aec49f699bd25c407155e9c5 (patch) | |
tree | 6d46f223a177ada92c6f47c36ba2e51cd6041037 /kernel/trace/ftrace.c | |
parent | 0296e4254f3318e0dcad9706fa1daf8e5addc1e9 (diff) | |
download | linux-fsl-qoriq-a32c7765e2796395aec49f699bd25c407155e9c5.tar.xz |
tracing: Fix stack tracer sysctl handling
This made my machine completely frozen:
# echo 1 > /proc/sys/kernel/stack_tracer_enabled
# echo 2 > /proc/sys/kernel/stack_tracer_enabled
The cause is register_ftrace_function() was called twice.
Also fix ftrace_enabled sysctl, though seems nothing bad happened
as I tested it.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4A448D17.9010305@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/ftrace.c')
-rw-r--r-- | kernel/trace/ftrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index f3716bf..bce9e01 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c @@ -3160,10 +3160,10 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, ret = proc_dointvec(table, write, file, buffer, lenp, ppos); - if (ret || !write || (last_ftrace_enabled == ftrace_enabled)) + if (ret || !write || (last_ftrace_enabled == !!ftrace_enabled)) goto out; - last_ftrace_enabled = ftrace_enabled; + last_ftrace_enabled = !!ftrace_enabled; if (ftrace_enabled) { |