rcu: Add ACCESS_ONCE() for RCU_INIT_POINTER()

It is permissible to use RCU_INIT_POINTER() instead of rcu_assign_pointer()
in a couple of cases where readers might be concurrently accessing the
pointer being assigned to: (1) When assigning NULL and (2) When assigning
a pointer that is already visible to readers.  In these two cases, we
should really be using ACCESS_ONCE() to prevent compiler mischief.  This
commit therefore adds the ACCESS_ONCE().

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 file changed