mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
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>
This commit is contained in:
parent
76638d9650
commit
f4d0706cde
3 changed files with 2 additions and 6 deletions
|
@ -5015,7 +5015,6 @@ int ftrace_regex_release(struct inode *inode, struct file *file)
|
|||
|
||||
parser = &iter->parser;
|
||||
if (trace_parser_loaded(parser)) {
|
||||
parser->buffer[parser->idx] = 0;
|
||||
ftrace_match_records(iter->hash, parser->buffer, parser->idx);
|
||||
}
|
||||
|
||||
|
@ -5329,7 +5328,6 @@ ftrace_graph_release(struct inode *inode, struct file *file)
|
|||
parser = &fgd->parser;
|
||||
|
||||
if (trace_parser_loaded((parser))) {
|
||||
parser->buffer[parser->idx] = 0;
|
||||
ret = ftrace_graph_set_hash(fgd->new_hash,
|
||||
parser->buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue