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>
This commit is contained in:
Pranith Kumar 2014-09-25 14:03:34 -04:00 committed by Paul E. McKenney
parent 0eafa46823
commit 1a6c9b2675
1 changed files with 1 additions and 0 deletions

View File

@ -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)