tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 0bafb8f3ebc84525d0ae0fcea22d12151b99312f
commit: fd1d05c6c00a3a6cbbb7156c1a99396df33f75b6 [6371/6993] rcu/nocb: Handle concurrent
nocb kthreads creation
config: x86_64-randconfig-m001-20211214
(
https://download.01.org/0day-ci/archive/20211215/202112151130.18unyr6u-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
kernel/rcu/tree_nocb.h:1262 rcu_spawn_cpu_nocb_kthread() warn: inconsistent indenting
vim +1262 kernel/rcu/tree_nocb.h
1231
1232 /*
1233 * If the specified CPU is a no-CBs CPU that does not already have its
1234 * rcuo CB kthread, spawn it. Additionally, if the rcuo GP kthread
1235 * for this CPU's group has not yet been created, spawn it as well.
1236 */
1237 static void rcu_spawn_cpu_nocb_kthread(int cpu)
1238 {
1239 struct rcu_data *rdp = per_cpu_ptr(&rcu_data, cpu);
1240 struct rcu_data *rdp_gp;
1241 struct task_struct *t;
1242
1243 if (!rcu_scheduler_fully_active || !rcu_nocb_is_setup)
1244 return;
1245
1246 /* If there already is an rcuo kthread, then nothing to do. */
1247 if (rdp->nocb_cb_kthread)
1248 return;
1249
1250 /* If we didn't spawn the GP kthread first, reorganize! */
1251 rdp_gp = rdp->nocb_gp_rdp;
1252 mutex_lock(&rdp_gp->nocb_gp_kthread_mutex);
1253 if (!rdp_gp->nocb_gp_kthread) {
1254 t = kthread_run(rcu_nocb_gp_kthread, rdp_gp,
1255 "rcuog/%d", rdp_gp->cpu);
1256 if (WARN_ONCE(IS_ERR(t), "%s: Could not start rcuo GP kthread, OOM is now
expected behavior\n", __func__)) {
1257 mutex_unlock(&rdp_gp->nocb_gp_kthread_mutex);
1258 return;
1259 }
1260 WRITE_ONCE(rdp_gp->nocb_gp_kthread, t);
1261 }
1262 mutex_unlock(&rdp_gp->nocb_gp_kthread_mutex);
1263
1264 /* Spawn the kthread for this CPU. */
1265 t = kthread_run(rcu_nocb_cb_kthread, rdp,
1266 "rcuo%c/%d", rcu_state.abbr, cpu);
1267 if (WARN_ONCE(IS_ERR(t), "%s: Could not start rcuo CB kthread, OOM is now
expected behavior\n", __func__))
1268 return;
1269 WRITE_ONCE(rdp->nocb_cb_kthread, t);
1270 WRITE_ONCE(rdp->nocb_gp_kthread, rdp_gp->nocb_gp_kthread);
1271 }
1272
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org