padata: Fix cpu hotplug
authorSteffen Klassert <steffen.klassert@secunet.com>
Wed, 28 Mar 2012 06:44:07 +0000 (08:44 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 29 Mar 2012 11:52:46 +0000 (19:52 +0800)
We don't remove the cpu that went offline from our cpumasks
on cpu hotplug. This got lost somewhere along the line, so
restore it. This fixes a hang of the padata instance on cpu
hotplug.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
kernel/padata.c

index de3d0d9..89fe3d1 100644 (file)
@@ -748,6 +748,9 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu)
                        return -ENOMEM;
 
                padata_replace(pinst, pd);
+
+               cpumask_clear_cpu(cpu, pd->cpumask.cbcpu);
+               cpumask_clear_cpu(cpu, pd->cpumask.pcpu);
        }
 
        return 0;