OSDN Git Service

rcu: Add WRITE_ONCE() to rcu_node ->qsmask update
authorPaul E. McKenney <paulmck@kernel.org>
Fri, 3 Jan 2020 19:38:51 +0000 (11:38 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Thu, 20 Feb 2020 23:58:22 +0000 (15:58 -0800)
commit7672d647ddae37d2ea267159950bcc311e962434
tree91c4c0ed6bd41b08b32a1146bd5e8dc5d3e7eaa3
parent8a7e8f51714004112a0bbbf751f3dd0fcbbbc983
rcu: Add WRITE_ONCE() to rcu_node ->qsmask update

The rcu_node structure's ->qsmask 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.

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