diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-12-14 08:00:02 +0300 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2022-02-02 04:05:10 +0300 |
commit | 63c564da11cbed96ec6cf0b5faf6af0b7e3624d2 (patch) | |
tree | 0101804b6dd0a700d15277d3e0a789930eae4109 /kernel/rcu/tree_exp.h | |
parent | 4d266c247d56751c2c97e0c411212b59e90922fc (diff) | |
download | linux-63c564da11cbed96ec6cf0b5faf6af0b7e3624d2.tar.xz |
rcu: Mark ->expmask access in synchronize_rcu_expedited_wait()
This commit adds a READ_ONCE() to an access to the rcu_node structure's
->expmask field to prevent compiler mischief. Detected by KCSAN.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_exp.h')
-rw-r--r-- | kernel/rcu/tree_exp.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_exp.h index 1568c8ef185b..60197ea24ceb 100644 --- a/kernel/rcu/tree_exp.h +++ b/kernel/rcu/tree_exp.h @@ -502,7 +502,8 @@ static void synchronize_rcu_expedited_wait(void) if (synchronize_rcu_expedited_wait_once(1)) return; rcu_for_each_leaf_node(rnp) { - for_each_leaf_node_cpu_mask(rnp, cpu, rnp->expmask) { + mask = READ_ONCE(rnp->expmask); + for_each_leaf_node_cpu_mask(rnp, cpu, mask) { rdp = per_cpu_ptr(&rcu_data, cpu); if (rdp->rcu_forced_tick_exp) continue; |