Commit 71a9b269 authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarJosh Triplett <josh@joshtriplett.org>
parent a381d757
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -949,6 +949,9 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
 * pointers, but you must use rcu_assign_pointer() to initialize the
 * external-to-structure pointer -after- you have completely initialized
 * the reader-accessible portions of the linked structure.
 *
 * Note that unlike rcu_assign_pointer(), RCU_INIT_POINTER() provides no
 * ordering guarantees for either the CPU or the compiler.
 */
#define RCU_INIT_POINTER(p, v) \
	do { \