OSDN Git Service

rcu: Add WRITE_ONCE() to rcu_node ->qsmaskinitnext
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 3 Jan 2020 23:44:23 +0000 (15:44 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2020 23:58:22 +0000 (15:58 -0800)
commit105abf82b0a62664edabcd4c5b4d9414c74ef399
treecb1adde397babb2e7c1b810f8380a204798d29de
parent2906d2154cd6ad6e4452cc25315d3cea7bb7f2d7
rcu: Add WRITE_ONCE() to rcu_node ->qsmaskinitnext

The rcu_state structure's ->qsmaskinitnext field is read locklessly,
so this commit adds the WRITE_ONCE() to an update in order to provide
proper documentation and READ_ONCE()/WRITE_ONCE() pairing.

This data race was reported by KCSAN.  Not appropriate for backporting
due to failure being unlikely for systems not doing incessant CPU-hotplug
operations.

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