aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-03-31 16:13:02 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-04-29 11:45:13 -0400
commit71a9b26963f8c2d0df6f782e2b29ccefc22d4fba (patch)
tree7455596d0d31cf2f4a0a3c42359ace0e703a313c /include/linux/rcupdate.h
parenta381d757d93f6e43063f74888676edd6216d0aff (diff)
rcu: Document RCU_INIT_POINTER()'s lack of ordering guarantees
Although rcu_assign_pointer() provides ordering guarantees, RCU_INIT_POINTER() does not. This commit makes that explicit in the docbook comment header. Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index fdc422f3d61d..3c5ef02ea580 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -949,6 +949,9 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
949 * pointers, but you must use rcu_assign_pointer() to initialize the 949 * pointers, but you must use rcu_assign_pointer() to initialize the
950 * external-to-structure pointer -after- you have completely initialized 950 * external-to-structure pointer -after- you have completely initialized
951 * the reader-accessible portions of the linked structure. 951 * the reader-accessible portions of the linked structure.
952 *
953 * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no
954 * ordering guarantees for either the CPU or the compiler.
952 */ 955 */
953#define RCU_INIT_POINTER(p, v) \ 956#define RCU_INIT_POINTER(p, v) \
954 do { \ 957 do { \