]> git.baikalelectronics.ru Git - kernel.git/commit
srcu: Fix process_srcu()/srcu_batches_completed() datarace
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 23 Dec 2019 03:39:35 +0000 (19:39 -0800)
committerPaul E. McKenney <paulmck@kernel.org>
Fri, 21 Feb 2020 00:01:11 +0000 (16:01 -0800)
commit52a2ceb0f9185548fb6b5d8379b4858b5f37ddc3
tree21148b0b3bd1e4c676a50e9414e5a919fd85350c
parent1dea80888a1738ea766238588994906583bda367
srcu: Fix process_srcu()/srcu_batches_completed() datarace

The srcu_struct structure's ->srcu_idx field is accessed locklessly,
so reads must use READ_ONCE().  This commit therefore adds the needed
READ_ONCE() invocation where it was missed.

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