diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2006-01-10 09:24:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:49:47 -0500 |
commit | a9c828155ae8d1a1576f9648cc4d9677aea53f89 (patch) | |
tree | 7b087188579ff897332a767af1ff695ab5bc116f | |
parent | 69a0b3157983925f14fe0bdc49622d5389538d8d (diff) |
[PATCH] rcu: fix hotplug-cpu ->donelist leak
Pointed out by Srivatsa Vaddagiri <vatsa@in.ibm.com>.
rcu_do_batch() stops after processing maxbatch callbacks
on ->donelist leaving rcu_tasklet in TASKLET_STATE_SCHED
state.
If CPU_DEAD event happens remaining ->donelist entries are
lost, rcu_offline_cpu() kills this tasklet.
With this patch ->donelist migrates along with ->curlist
and ->nxtlist to the current cpu.
Compile tested.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/rcupdate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index e18f9190eafa..0cf8146bd585 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c | |||
@@ -343,8 +343,9 @@ static void __rcu_offline_cpu(struct rcu_data *this_rdp, | |||
343 | spin_unlock_bh(&rcp->lock); | 343 | spin_unlock_bh(&rcp->lock); |
344 | rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail); | 344 | rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail); |
345 | rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail); | 345 | rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail); |
346 | 346 | rcu_move_batch(this_rdp, rdp->donelist, rdp->donetail); | |
347 | } | 347 | } |
348 | |||
348 | static void rcu_offline_cpu(int cpu) | 349 | static void rcu_offline_cpu(int cpu) |
349 | { | 350 | { |
350 | struct rcu_data *this_rdp = &get_cpu_var(rcu_data); | 351 | struct rcu_data *this_rdp = &get_cpu_var(rcu_data); |