aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-10-24 14:11:08 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-10-29 13:20:08 -0400
commitbbe5d7a93a39104be146f71b9b99af8fb65a6a2d (patch)
tree93b01d8fe8e5a1ce8fa35b43d00213cb58e3a751 /kernel/rcu
parent776d680711f4836964f3005ee53794661ca74629 (diff)
rcu: Fix for rcuo online-time-creation reorganization bug
Commit 35ce7f29a44a (rcu: Create rcuo kthreads only for onlined CPUs) contains checks for the case where CPUs are brought online out of order, re-wiring the rcuo leader-follower relationships as needed. Unfortunately, this rewiring was broken. This apparently went undetected due to the tendency of systems to bring CPUs online in order. This commit nevertheless fixes the rewiring. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/tree_plugin.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 6d07fb402e84..5053dae4454e 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2586,9 +2586,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
2586 rdp->nocb_leader = rdp_spawn; 2586 rdp->nocb_leader = rdp_spawn;
2587 if (rdp_last && rdp != rdp_spawn) 2587 if (rdp_last && rdp != rdp_spawn)
2588 rdp_last->nocb_next_follower = rdp; 2588 rdp_last->nocb_next_follower = rdp;
2589 rdp_last = rdp; 2589 if (rdp == rdp_spawn) {
2590 rdp = rdp->nocb_next_follower; 2590 rdp = rdp->nocb_next_follower;
2591 rdp_last->nocb_next_follower = NULL; 2591 } else {
2592 rdp_last = rdp;
2593 rdp = rdp->nocb_next_follower;
2594 rdp_last->nocb_next_follower = NULL;
2595 }
2592 } while (rdp); 2596 } while (rdp);
2593 rdp_spawn->nocb_next_follower = rdp_old_leader; 2597 rdp_spawn->nocb_next_follower = rdp_old_leader;
2594 } 2598 }