OSDN Git Service

srcu: Fix __call_srcu()/process_srcu() datarace
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 23 Dec 2019 03:32:54 +0000 (19:32 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 21 Feb 2020 00:01:11 +0000 (16:01 -0800)
commit7ff8b4502bc0f576450d4ecbda97fa30e8002ed1
tree9f86c585fad2a69e0085e77448dbecbdc896e6be
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9
srcu: Fix __call_srcu()/process_srcu() datarace

The srcu_node structure's ->srcu_gp_seq_needed_exp field is accessed
locklessly, so updates must use WRITE_ONCE().  This commit therefore
adds the needed WRITE_ONCE() invocations.

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/srcutree.c