diff options
author | Pranith Kumar <bobby.prani@gmail.com> | 2014-09-25 14:03:34 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-11-13 13:35:38 -0500 |
commit | 1a6c9b2675460718f819def9a272cca35575eeb7 (patch) | |
tree | 67aef2e75b75bb4a63ce3dbedbc47b3c598c596a /include/linux | |
parent | 0eafa46823971b4c368f4cdf19f1d081c4ee52b7 (diff) |
rcu: Add sparse check for RCU_INIT_POINTER()
Add a sparse check when RCU_INIT_POINTER() is used to assign a non __rcu
annotated pointer.
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/rcupdate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index a4a819ffb2d1..a033d8b55773 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -1047,6 +1047,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) | |||
1047 | */ | 1047 | */ |
1048 | #define RCU_INIT_POINTER(p, v) \ | 1048 | #define RCU_INIT_POINTER(p, v) \ |
1049 | do { \ | 1049 | do { \ |
1050 | rcu_dereference_sparse(p, __rcu); \ | ||
1050 | p = RCU_INITIALIZER(v); \ | 1051 | p = RCU_INITIALIZER(v); \ |
1051 | } while (0) | 1052 | } while (0) |
1052 | 1053 | ||