aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorChunyan Zhang <zhang.chunyan@linaro.org>2017-06-07 04:12:51 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-07-20 09:27:29 -0400
commitf86f418059b94aa01f9342611a272ca60c583e89 (patch)
treec2379cf53b9f2e0dfe85c4cbc21fd5ec39e38288 /include/linux
parentdb9108e054700c96322b0f0028546aa4e643cf0b (diff)
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/linux')
-rw-r--r--include/linux/ftrace.h6
-rw-r--r--include/linux/trace_events.h2
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 {
145#ifdef CONFIG_DYNAMIC_FTRACE 145#ifdef CONFIG_DYNAMIC_FTRACE
146/* The hash used to know what functions callbacks trace */ 146/* The hash used to know what functions callbacks trace */
147struct ftrace_ops_hash { 147struct ftrace_ops_hash {
148 struct ftrace_hash *notrace_hash; 148 struct ftrace_hash __rcu *notrace_hash;
149 struct ftrace_hash *filter_hash; 149 struct ftrace_hash __rcu *filter_hash;
150 struct mutex regex_lock; 150 struct mutex regex_lock;
151}; 151};
152 152
@@ -168,7 +168,7 @@ static inline void ftrace_free_init_mem(void) { }
168 */ 168 */
169struct ftrace_ops { 169struct ftrace_ops {
170 ftrace_func_t func; 170 ftrace_func_t func;
171 struct ftrace_ops *next; 171 struct ftrace_ops __rcu *next;
172 unsigned long flags; 172 unsigned long flags;
173 void *private; 173 void *private;
174 ftrace_func_t saved_func; 174 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 {
338struct trace_event_file { 338struct trace_event_file {
339 struct list_head list; 339 struct list_head list;
340 struct trace_event_call *event_call; 340 struct trace_event_call *event_call;
341 struct event_filter *filter; 341 struct event_filter __rcu *filter;
342 struct dentry *dir; 342 struct dentry *dir;
343 struct trace_array *tr; 343 struct trace_array *tr;
344 struct trace_subsystem_dir *system; 344 struct trace_subsystem_dir *system;