diff options
author | Changbin Du <changbin.du@intel.com> | 2018-01-16 12:02:30 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-01-23 23:57:28 +0300 |
commit | f4d0706cde27f29ff89e6bf94ded4113f8fe6e80 (patch) | |
tree | 5cd8ddafa8948c8f64fb52c88d61f85d2d773cb7 /kernel/trace/trace_events.c | |
parent | 76638d96502744b0d593f2386b75ae5a017c13bb (diff) | |
download | linux-f4d0706cde27f29ff89e6bf94ded4113f8fe6e80.tar.xz |
tracing: Make sure the parsed string always terminates with '\0'
Always mark the parsed string with a terminated nul '\0' character. This removes
the need for the users to have to append the '\0' before using the parsed string.
Link: http://lkml.kernel.org/r/1516093350-12045-4-git-send-email-changbin.du@intel.com
Acked-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace/trace_events.c')
-rw-r--r-- | kernel/trace/trace_events.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 1b87157edbff..05c7172c6667 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c @@ -885,8 +885,6 @@ ftrace_event_write(struct file *file, const char __user *ubuf, if (*parser.buffer == '!') set = 0; - parser.buffer[parser.idx] = 0; - ret = ftrace_set_clr_event(tr, parser.buffer + !set, set); if (ret) goto out_put; |