]> git.karo-electronics.de Git - linux-beck.git/commit
rcu: Add ACCESS_ONCE() to ->qlen accesses
authorPaul E. McKenney <paul.mckenney@linaro.org>
Wed, 9 May 2012 22:44:42 +0000 (15:44 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 2 Jul 2012 19:34:22 +0000 (12:34 -0700)
commit1d1fb395f6dbc07b36285bbedcf01a73b57f7cb5
tree450c8e5e2d69c6e8b6fd7820d6a7dc112d60325b
parent3f5d3ea64f1783f0d4ea0d35890ae3297f045a8b
rcu: Add ACCESS_ONCE() to ->qlen accesses

The _rcu_barrier() function accesses other CPUs' rcu_data structure's
->qlen field without benefit of locking.  This commit therefore adds
the required ACCESS_ONCE() wrappers around accesses and updates that
need it.

ACCESS_ONCE() is not needed when a CPU accesses its own ->qlen, or
in code that cannot run while _rcu_barrier() is sampling ->qlen fields.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
kernel/rcutree.c