Commit 63c564da authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

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: default avatarPaul E. McKenney <paulmck@kernel.org>
parent 4d266c24
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;