summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2009-12-22 04:35:16 +0100
committerSteven Rostedt <rostedt@goodmis.org>2009-12-22 04:35:16 +0100
commitc757bea93bea4b77ebd181cc6dca60c15e3b1a2c (patch)
treef1a4ddfea72acf13864f543648bf3f79924cbdc3 /kernel
parentDocumentation: Update ftrace-design.txt (diff)
downloadlinux-c757bea93bea4b77ebd181cc6dca60c15e3b1a2c.tar.xz
linux-c757bea93bea4b77ebd181cc6dca60c15e3b1a2c.zip
tracing: Fix setting tracer specific options
The function __set_tracer_option() takes as its last parameter a "neg" value. If set it should negate the value of the option. The trace_options_write() passed the value written to the file which is what the new value needs to be set as. But since this is not the negative, it never sets the value. Reported-by: Peter Zijlstra <peterz@infradead.org> Cc: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/trace/trace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ee61915935d5..d0a4c12d1f1c 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3949,7 +3949,7 @@ trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt,
if (!!(topt->flags->val & topt->opt->bit) != val) {
mutex_lock(&trace_types_lock);
ret = __set_tracer_option(current_trace, topt->flags,
- topt->opt, val);
+ topt->opt, !val);
mutex_unlock(&trace_types_lock);
if (ret)
return ret;