Commit a9c82815 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds

[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: default avatarOleg Nesterov <oleg@tv-sign.ru>
Acked-by: default avatarPaul E. McKenney <paulmck@us.ibm.com>
Cc: Srivatsa Vaddagiri <vatsa@in.ibm.com>
Cc: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 69a0b315
...@@ -343,8 +343,9 @@ static void __rcu_offline_cpu(struct rcu_data *this_rdp, ...@@ -343,8 +343,9 @@ static void __rcu_offline_cpu(struct rcu_data *this_rdp,
spin_unlock_bh(&rcp->lock); spin_unlock_bh(&rcp->lock);
rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail); rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail);
rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail); rcu_move_batch(this_rdp, rdp->nxtlist, rdp->nxttail);
rcu_move_batch(this_rdp, rdp->donelist, rdp->donetail);
} }
static void rcu_offline_cpu(int cpu) static void rcu_offline_cpu(int cpu)
{ {
struct rcu_data *this_rdp = &get_cpu_var(rcu_data); struct rcu_data *this_rdp = &get_cpu_var(rcu_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment