diff options
author | Steffen Klassert <steffen.klassert@secunet.com> | 2010-05-18 23:45:35 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2010-05-18 23:45:35 -0400 |
commit | 3789ae7dcd29fa146b23dc30377925d1f73c8adf (patch) | |
tree | 39f4bc70ccbfafa9290f21bc23bbf296d8656538 /kernel/padata.c | |
parent | 0198ffd135f51d4fbb0c50036395716c06632ed9 (diff) |
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 <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'kernel/padata.c')
-rw-r--r-- | kernel/padata.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
763 | #ifdef CONFIG_HOTPLUG_CPU | 763 | #ifdef CONFIG_HOTPLUG_CPU |
764 | unregister_hotcpu_notifier(&pinst->cpu_notifier); | 764 | unregister_hotcpu_notifier(&pinst->cpu_notifier); |
765 | #endif | 765 | #endif |
766 | get_online_cpus(); | ||
766 | padata_flush_queues(pinst->pd); | 767 | padata_flush_queues(pinst->pd); |
768 | put_online_cpus(); | ||
769 | |||
767 | padata_free_pd(pinst->pd); | 770 | padata_free_pd(pinst->pd); |
768 | free_cpumask_var(pinst->cpumask); | 771 | free_cpumask_var(pinst->cpumask); |
769 | kfree(pinst); | 772 | kfree(pinst); |