rcu: Add READ_ONCE() to rcu_node ->gp_seq
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 3 Jan 2020 22:53:31 +0000 (14:53 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2020 23:58:22 +0000 (15:58 -0800)
commit0937d045732b5dd5e5df1fb6355d5f4e01f3c4d7
tree679da8876a4e372ab67634dd2f3b1b675c7b6a8f
parentb0c18c87730a4de6da0303fa99aea43e814233f9
rcu: Add READ_ONCE() to rcu_node ->gp_seq

The rcu_node structure's ->gp_seq field is read locklessly, so this
commit adds the READ_ONCE() to several loads in order to avoid
destructive compiler optimizations.

This data race was reported by KCSAN.  Not appropriate for backporting
because this affects only tracing and warnings.

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