From: Steffen Klassert Date: Wed, 19 May 2010 03:45:35 +0000 (+1000) Subject: padata: Use get_online_cpus/put_online_cpus in padata_free X-Git-Tag: MMI-PSA29.97-13-9~23089^2~48 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3789ae7dcd29fa146b23dc30377925d1f73c8adf;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git padata: Use get_online_cpus/put_online_cpus in padata_free Add get_online_cpus/put_online_cpus to ensure that no cpu goes offline during the flushing of the padata percpu queues. Signed-off-by: Steffen Klassert Signed-off-by: Herbert Xu --- diff --git a/kernel/padata.c b/kernel/padata.c index ca89dfb69805..b1c9857f8402 100644 --- a/kernel/padata.c +++ b/kernel/padata.c @@ -763,7 +763,10 @@ void padata_free(struct padata_instance *pinst) #ifdef CONFIG_HOTPLUG_CPU unregister_hotcpu_notifier(&pinst->cpu_notifier); #endif + get_online_cpus(); padata_flush_queues(pinst->pd); + put_online_cpus(); + padata_free_pd(pinst->pd); free_cpumask_var(pinst->cpumask); kfree(pinst);