mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
0198ffd135
commit
3789ae7dcd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user