From: Oleg Nesterov Date: Tue, 10 Jan 2006 14:24:53 +0000 (+0300) Subject: [PATCH] rcu: fix hotplug-cpu ->donelist leak X-Git-Tag: v2.6.16-rc1~464 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9c828155ae8d1a1576f9648cc4d9677aea53f89;p=linux-2.6 [PATCH] rcu: fix hotplug-cpu ->donelist leak Pointed out by Srivatsa Vaddagiri . 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 Acked-by: Paul E. McKenney Cc: Srivatsa Vaddagiri Cc: Dipankar Sarma Signed-off-by: Linus Torvalds --- diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index e18f9190ea..0cf8146bd5 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -343,8 +343,9 @@ static void __rcu_offline_cpu(struct rcu_data *this_rdp, spin_unlock_bh(&rcp->lock); rcu_move_batch(this_rdp, rdp->curlist, rdp->curtail); 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) { struct rcu_data *this_rdp = &get_cpu_var(rcu_data);