aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/trace_events.h
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2018-05-07 16:02:14 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2018-05-29 08:28:02 -0400
commitc94e45bc38ae484ee989e6e3b2496a52776da9e4 (patch)
tree95009b531888234a9134896c38716fcc68363653 /include/linux/trace_events.h
parenttracepoints: Fix the descriptions of tracepoint_probe_register{_prio} (diff)
downloadlinux-dev-c94e45bc38ae484ee989e6e3b2496a52776da9e4.tar.xz
linux-dev-c94e45bc38ae484ee989e6e3b2496a52776da9e4.zip
tracing: Do not reference event data in post call triggers
Trace event triggers can be called before or after the event has been committed. If it has been called after the commit, there's a possibility that the event no longer exists. Currently, the two post callers is the trigger to disable tracing (traceoff) and the one that will record a stack dump (stacktrace). Neither of them reference the trace event entry record, as that would lead to a race condition that could pass in corrupted data. To prevent any other users of the post data triggers from using the trace event record, pass in NULL to the post call trigger functions for the event record, as they should never need to use them in the first place. This does not fix any bug, but prevents bugs from happening by new post call trigger users. Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include/linux/trace_events.h')
-rw-r--r--include/linux/trace_events.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
index 2bde3eff564c..d1c442d9bd85 100644
--- a/include/linux/trace_events.h
+++ b/include/linux/trace_events.h
@@ -435,8 +435,7 @@ event_triggers_call(struct trace_event_file *file, void *rec,
struct ring_buffer_event *event);
extern void
event_triggers_post_call(struct trace_event_file *file,
- enum event_trigger_type tt,
- void *rec, struct ring_buffer_event *event);
+ enum event_trigger_type tt);
bool trace_event_ignore_this_pid(struct trace_event_file *trace_file);