Skip to content

Commit 3789ae7

Browse files
klassertherbertx
authored andcommitted
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>
1 parent 0198ffd commit 3789ae7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎kernel/padata.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,10 @@ void padata_free(struct padata_instance *pinst)
763763
#ifdef CONFIG_HOTPLUG_CPU
764764
unregister_hotcpu_notifier(&pinst->cpu_notifier);
765765
#endif
766+
get_online_cpus();
766767
padata_flush_queues(pinst->pd);
768+
put_online_cpus();
769+
767770
padata_free_pd(pinst->pd);
768771
free_cpumask_var(pinst->cpumask);
769772
kfree(pinst);

0 commit comments

Comments
 (0)