From: Paul E. McKenney Date: Thu, 3 Jun 2021 17:17:36 +0000 (-0700) Subject: rcu: Mark lockless ->qsmask read in rcu_check_boost_fail() X-Git-Tag: accepted/tizen/unified/20230118.172025~6579^2^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d9ee962feb4f26d4eac0042861457d941aa2df5f;p=platform%2Fkernel%2Flinux-rpi.git 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 --- diff --git a/kernel/rcu/tree_stall.h b/kernel/rcu/tree_stall.h index 42847ca..6dd6c9a 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))