diff options
author | Paul E. McKenney <paulmck@kernel.org> | 2021-06-03 10:17:36 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2021-08-06 13:41:48 -0700 |
commit | d9ee962feb4f26d4eac0042861457d941aa2df5f (patch) | |
tree | 1b549a32b07d72c725c7113bb7ec24fe4337c198 /kernel/rcu/tree_stall.h | |
parent | 65bfdd36c113f5d579a382d8f2847210ea4cdca6 (diff) |
rcu: Mark lockless ->qsmask read in rcu_check_boost_fail()
Accesses to ->qsmask are normally protected by ->lock, but there is an
exception in the diagnostic code in rcu_check_boost_fail(). This commit
therefore applies data_race() to this access to avoid KCSAN complaining
about the C-language writes protected by ->lock.
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/rcu/tree_stall.h')
-rw-r--r-- | kernel/rcu/tree_stall.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 42847caa3909..6dd6c9aa3f75 100644 --- a/kernel/rcu/tree_stall.h +++ b/kernel/rcu/tree_stall.h @@ -766,7 +766,7 @@ bool rcu_check_boost_fail(unsigned long gp_state, int *cpup) rcu_for_each_leaf_node(rnp) { if (!cpup) { - if (READ_ONCE(rnp->qsmask)) { + if (data_race(READ_ONCE(rnp->qsmask))) { return false; } else { if (READ_ONCE(rnp->gp_tasks)) |