rcu/nocb: Handle concurrent nocb kthreads creation
authorNeeraj Upadhyay <quic_neeraju@quicinc.com>
Sat, 11 Dec 2021 17:01:39 +0000 (22:31 +0530)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 2 Feb 2022 01:19:02 +0000 (17:19 -0800)
commit02e3024175274ed4bf7912e7a1281b300cec76b5
tree117698b38732fd21ccad0814910bbb4792d5bc66
parenta47f9f131dfe4f765e385fa90e13032eadb00bac
rcu/nocb: Handle concurrent nocb kthreads creation

When multiple CPUs in the same nocb gp/cb group concurrently
come online, they might try to concurrently create the same
rcuog kthread. Fix this by using nocb gp CPU's spawn mutex to
provide mutual exclusion for the rcuog kthread creation code.

[ paulmck: Whitespace fixes per kernel test robot feedback. ]

Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Neeraj Upadhyay <quic_neeraju@quicinc.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/rcu/tree.h
kernel/rcu/tree_nocb.h