summaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2015-06-02 17:26:48 +0200
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-07-22 15:27:27 -0700
commit155d1d12786386d21732f9bba036343ffa43847d (patch)
tree9b50f2482c59f15d222ec348c2d7d166304736f3 /include/linux/rcupdate.h
parentbe55fa2ad244678beed11d2827d88b7f80ff4730 (diff)
downloadtalos-obmc-linux-155d1d12786386d21732f9bba036343ffa43847d.tar.gz
talos-obmc-linux-155d1d12786386d21732f9bba036343ffa43847d.zip
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: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index def6d45ad61c..c63428c1ed8a 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -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)
/**
OpenPOWER on IntegriCloud