提交 3789ae7d 编写于 作者: S Steffen Klassert 提交者: Herbert Xu

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: NSteffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 0198ffd1
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册