diff options
author | Chunyan Zhang <zhang.chunyan@linaro.org> | 2017-06-07 16:12:51 +0800 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2017-07-20 09:27:29 -0400 |
commit | f86f418059b94aa01f9342611a272ca60c583e89 (patch) | |
tree | c2379cf53b9f2e0dfe85c4cbc21fd5ec39e38288 /include | |
parent | db9108e054700c96322b0f0028546aa4e643cf0b (diff) | |
download | linux-f86f418059b94aa01f9342611a272ca60c583e89.tar.gz linux-f86f418059b94aa01f9342611a272ca60c583e89.tar.bz2 linux-f86f418059b94aa01f9342611a272ca60c583e89.zip |
trace: fix the errors caused by incompatible type of RCU variables
The variables which are processed by RCU functions should be annotated
as RCU, otherwise sparse will report the errors like below:
"error: incompatible types in comparison expression (different
address spaces)"
Link: http://lkml.kernel.org/r/1496823171-7758-1-git-send-email-zhang.chunyan@linaro.org
Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org>
[ Updated to not be 100% 80 column strict ]
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ftrace.h | 6 | ||||
-rw-r--r-- | include/linux/trace_events.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 5857390ac35a..6383115e9d2c 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -145,8 +145,8 @@ enum { #ifdef CONFIG_DYNAMIC_FTRACE /* The hash used to know what functions callbacks trace */ struct ftrace_ops_hash { - struct ftrace_hash *notrace_hash; - struct ftrace_hash *filter_hash; + struct ftrace_hash __rcu *notrace_hash; + struct ftrace_hash __rcu *filter_hash; struct mutex regex_lock; }; @@ -168,7 +168,7 @@ static inline void ftrace_free_init_mem(void) { } */ struct ftrace_ops { ftrace_func_t func; - struct ftrace_ops *next; + struct ftrace_ops __rcu *next; unsigned long flags; void *private; ftrace_func_t saved_func; diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h index f73cedfa2e0b..536c80ff7ad9 100644 --- a/include/linux/trace_events.h +++ b/include/linux/trace_events.h @@ -338,7 +338,7 @@ enum { struct trace_event_file { struct list_head list; struct trace_event_call *event_call; - struct event_filter *filter; + struct event_filter __rcu *filter; struct dentry *dir; struct trace_array *tr; struct trace_subsystem_dir *system; |