rcu: Add READ_ONCE() to rcu_segcblist ->tails[]
authorPaul E. McKenney <paulmck@kernel.org>
Sat, 4 Jan 2020 00:14:08 +0000 (16:14 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2020 23:58:22 +0000 (15:58 -0800)
commitbfeebe24212d374f82bbf5b005371fe13acabb93
tree4184f7f2cf3a5e49bb0a309bf6f664fafd6c44e1
parent0050c7b2d27c3cc126df59bd8094fb3d25b00ade
rcu: Add READ_ONCE() to rcu_segcblist ->tails[]

The rcu_segcblist structure's ->tails[] array entries are read
locklessly, so this commit adds the READ_ONCE() to a load in order to
avoid destructive compiler optimizations.

This data race was reported by KCSAN.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/rcu_segcblist.c