diff options
Diffstat (limited to 'kernel/smpboot.c')
-rw-r--r-- | kernel/smpboot.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/smpboot.c b/kernel/smpboot.c index f032fb5284e3..40190f28db35 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c | |||
@@ -280,6 +280,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) | |||
280 | unsigned int cpu; | 280 | unsigned int cpu; |
281 | int ret = 0; | 281 | int ret = 0; |
282 | 282 | ||
283 | get_online_cpus(); | ||
283 | mutex_lock(&smpboot_threads_lock); | 284 | mutex_lock(&smpboot_threads_lock); |
284 | for_each_online_cpu(cpu) { | 285 | for_each_online_cpu(cpu) { |
285 | ret = __smpboot_create_thread(plug_thread, cpu); | 286 | ret = __smpboot_create_thread(plug_thread, cpu); |
@@ -292,6 +293,7 @@ int smpboot_register_percpu_thread(struct smp_hotplug_thread *plug_thread) | |||
292 | list_add(&plug_thread->list, &hotplug_threads); | 293 | list_add(&plug_thread->list, &hotplug_threads); |
293 | out: | 294 | out: |
294 | mutex_unlock(&smpboot_threads_lock); | 295 | mutex_unlock(&smpboot_threads_lock); |
296 | put_online_cpus(); | ||
295 | return ret; | 297 | return ret; |
296 | } | 298 | } |
297 | EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread); | 299 | EXPORT_SYMBOL_GPL(smpboot_register_percpu_thread); |