projects/linux·commit 4ffd4ebf

Merge tag 'trace-3.8-rc2-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

4ffd4ebf · Linus Torvalds <[email protected]> · 2013-01-10 09:03:16 -08:00

Pull tracing regression fix from Steven Rostedt:
 "A change that came in this merge window broke the writing to the
  trace_options file.  It causes garbage to be read during the compare
  of option names, and breaks setting options via the trace_options
  file, although options can still be set via the options/<option>
  files."

* tag 'trace-3.8-rc2-regression-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  tracing: Fix regression of trace_options file setting
Commit
4ffd4ebf9d19c07285ea8a26d30a17ff28767132
Parents
7be72c39 · a8dd2176

Merge commit. Changes below are compared with the first parent: 7be72c39.

Changes

1 files changed · +2 −0

FileStatusAddDelContent
kernel/trace/trace.cmodified+2−0View file

kernel/trace/trace.c

View file
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index e512567..1bbfa04 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -2899,6 +2899,8 @@ tracing_trace_options_write(struct file *filp, const char __user *ubuf,
if (copy_from_user(&buf, ubuf, cnt))
return -EFAULT;
+ buf[cnt] = 0;
+
trace_set_options(buf);
*ppos += cnt;