X-Git-Url: https://git.stricted.de/?a=blobdiff_plain;f=kernel%2Fsmpboot.c;h=7020eecb398bd789a2de03638d6e27a8aa1322dc;hb=8f4a52d25a0d395f94299707bc3198a3dd3acc4c;hp=02fc5c9336735a834378dbbb6fff8e57b919b0fa;hpb=e0fd9affeb64088eff407dfc98bbd3a5c17ea479;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git diff --git a/kernel/smpboot.c b/kernel/smpboot.c index 02fc5c933673..7020eecb398b 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c @@ -279,6 +279,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) unsigned int cpu; int ret = 0; + get_online_cpus(); mutex_lock(&smpboot_threads_lock); for_each_online_cpu(cpu) { ret = __smpboot_create_thread(plug_thread, cpu); @@ -291,6 +292,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) list_add(&plug_thread->list, &hotplug_threads); out: mutex_unlock(&smpboot_threads_lock); + put_online_cpus(); return ret; } EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread);