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.
Unified · Split
| @@ -766,7 +766,7 @@ bool rcu_check_boost_fail(unsigned long gp_state, int *cpup) · 765 unmodified lines | ||
| 766 | 766 | |
| 767 | 767 | rcu_for_each_leaf_node(rnp) { |
| 768 | 768 | if (!cpup) { |
| 769 | − if (READ_ONCE(rnp->qsmask)) { | |
| 769 | + if (data_race(READ_ONCE(rnp->qsmask))) { | |
| 770 | 770 | return false; |
| 771 | 771 | } else { |
| 772 | 772 | if (READ_ONCE(rnp->gp_tasks)) |