rcu: Fix for rcuo online-time-creation reorganization bug

Commit 35ce7f29a4 (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>
This commit is contained in:
Paul E. McKenney 2014-10-24 11:11:08 -07:00
parent 776d680711
commit bbe5d7a93a
1 changed files with 7 additions and 3 deletions

View File

@ -2586,9 +2586,13 @@ static void rcu_spawn_one_nocb_kthread(struct rcu_state *rsp, int cpu)
rdp->nocb_leader = rdp_spawn; rdp->nocb_leader = rdp_spawn;
if (rdp_last && rdp != rdp_spawn) if (rdp_last && rdp != rdp_spawn)
rdp_last->nocb_next_follower = rdp; rdp_last->nocb_next_follower = rdp;
rdp_last = rdp; if (rdp == rdp_spawn) {
rdp = rdp->nocb_next_follower; rdp = rdp->nocb_next_follower;
rdp_last->nocb_next_follower = NULL; } else {
rdp_last = rdp;
rdp = rdp->nocb_next_follower;
rdp_last->nocb_next_follower = NULL;
}
} while (rdp); } while (rdp);
rdp_spawn->nocb_next_follower = rdp_old_leader; rdp_spawn->nocb_next_follower = rdp_old_leader;
} }