summaryrefslogtreecommitdiff
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorPranith Kumar <bobby.prani@gmail.com>2014-09-25 22:03:34 +0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-11-13 21:35:38 +0300
commit1a6c9b2675460718f819def9a272cca35575eeb7 (patch)
tree67aef2e75b75bb4a63ce3dbedbc47b3c598c596a /include/linux/rcupdate.h
parent0eafa46823971b4c368f4cdf19f1d081c4ee52b7 (diff)
downloadlinux-1a6c9b2675460718f819def9a272cca35575eeb7.tar.xz
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/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h1
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)
*/
#define RCU_INIT_POINTER(p, v) \
do { \
+ rcu_dereference_sparse(p, __rcu); \
p = RCU_INITIALIZER(v); \
} while (0)