History

Merge tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt: "Fix probes written to the set_ftrace_filter file Now that there's a library that accesses the tracefs file system (libtracefs), the way the files are interacted with is slightly different than the command line. For instance, the write() system call is used directly instead of an echo. This exposes some old bugs. If a probe is written to "set_ftrace_filter" without any white space after it, it will be ignored. This is because the write expects that a string written to it that does not end with white spaces thinks there is more to come. But if the file is closed, the release function needs to finish it. The "set_ftrace_filter" release function handles the filter part of the "set_ftrace_filter" file, but did not handle the probe part" * tag 'trace-v5.13-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace: Handle commands when closing set_ftrace_filter file

Linus Torvalds committed 5 years ago

Commit 7ec901b2 parents 164e64a 8c9af471 file · +4 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/trace/ftrace.c+4−1
@@ -5624,7 +5624,10 @@ int ftrace_regex_release(struct inode *inode, struct file *file) · 5623 unmodified lines
56245624
56255625 parser = &iter->parser;
56265626 if (trace_parser_loaded(parser)) {
5627− ftrace_match_records(iter->hash, parser->buffer, parser->idx);
5627+ int enable = !(iter->flags & FTRACE_ITER_NOTRACE);
5628+
5629+ ftrace_process_regex(iter, parser->buffer,
5630+ parser->idx, enable);
56285631 }
56295632
56305633 trace_parser_put(parser);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t