Skip to content

Commit

Permalink
padata: Use get_online_cpus/put_online_cpus in padata_free
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
klassert authored and herbertx committed May 19, 2010
1 parent 0198ffd commit 3789ae7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kernel/padata.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3789ae7

Please sign in to comment.