diff options
author | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-05 19:39:36 +0200 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2018-04-06 14:56:53 +0200 |
commit | 1f3b0faa3e9dc713efce392af1f58542e735f822 (patch) | |
tree | 526505161349dc29cf00a0454d0f5be928691b35 /kernel/trace | |
parent | tracing: Fixup logic inversion on setting trace_global_clock defaults (diff) | |
download | linux-1f3b0faa3e9dc713efce392af1f58542e735f822.tar.xz linux-1f3b0faa3e9dc713efce392af1f58542e735f822.zip |
tracing: Add rcu dereference annotation for filter->prog
ftrace_function_set_filter() referenences filter->prog without annotation
and sparse complains about it. It needs a rcu_dereference_protected()
wrapper.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 80765597bc587 ("tracing: Rewrite filter logic to be simpler and faster")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace_events_filter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c index 703a416aa5c2..cf8460caa95c 100644 --- a/kernel/trace/trace_events_filter.c +++ b/kernel/trace/trace_events_filter.c @@ -1992,7 +1992,8 @@ static bool is_or(struct prog_entry *prog, int i) static int ftrace_function_set_filter(struct perf_event *event, struct event_filter *filter) { - struct prog_entry *prog = filter->prog; + struct prog_entry *prog = rcu_dereference_protected(filter->prog, + lockdep_is_held(&event_mutex)); struct function_filter_data data = { .first_filter = 1, .first_notrace = 1, |