Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 155d1d12 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Paul E. McKenney
Browse files

rcu: Use WRITE_ONCE in RCU_INIT_POINTER



For the paranoid amongst us GCC would be in its right to use byte stores
to write our NULL value, tell it not to do that.

Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
parent be55fa2a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -995,7 +995,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); \
		WRITE_ONCE(p, RCU_INITIALIZER(v)); \
	} while (0)

/**