aboutsummaryrefslogtreecommitdiff
path: root/include/linux/rcutiny.h
diff options
context:
space:
mode:
authorPingfan Liu <[email protected]>2022-09-06 11:36:42 -0700
committerPaul E. McKenney <[email protected]>2022-10-18 14:59:57 -0700
commit6343402ac35dd534291a6c82924a4f09cf6cd1e5 (patch)
tree513b8df4827d3f1e8a8f3506bf3559fa00d19952 /include/linux/rcutiny.h
parentd6fd907a95a73251bd8494e1ba5350342e05e74a (diff)
rcu: Synchronize ->qsmaskinitnext in rcu_boost_kthread_setaffinity()
Once either rcutree_online_cpu() or rcutree_dead_cpu() is invoked concurrently, the following rcu_boost_kthread_setaffinity() race can occur: CPU 1 CPU2 mask = rcu_rnp_online_cpus(rnp); ... mask = rcu_rnp_online_cpus(rnp); ... set_cpus_allowed_ptr(t, cm); set_cpus_allowed_ptr(t, cm); This results in CPU2's update being overwritten by that of CPU1, and thus the possibility of ->boost_kthread_task continuing to run on a to-be-offlined CPU. This commit therefore eliminates this race by relying on the pre-existing acquisition of ->boost_kthread_mutex to serialize the full process of changing the affinity of ->boost_kthread_task. Signed-off-by: Pingfan Liu <[email protected]> Cc: David Woodhouse <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Neeraj Upadhyay <[email protected]> Cc: Josh Triplett <[email protected]> Cc: Steven Rostedt <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Lai Jiangshan <[email protected]> Cc: Joel Fernandes <[email protected]> Cc: "Jason A. Donenfeld" <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
Diffstat (limited to 'include/linux/rcutiny.h')
0 files changed, 0 insertions, 0 deletions