diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-06 21:06:10 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-06 21:06:10 (GMT) |
commit | 29f12c48df4e6cba9df39dbe9d99649be27fb346 (patch) | |
tree | bd077b95e40f62ee345e4722150569faf33fe80b /kernel | |
parent | 2af613d3739b04b16fbd3c2b824b9ebaace89328 (diff) | |
parent | 135818bf494e6f8f7c9327d9d9e015f7548b6f8d (diff) | |
download | linux-29f12c48df4e6cba9df39dbe9d99649be27fb346.tar.xz |
Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core kernel fixes from Ingo Molnar:
"Two liblockdep fixes and a CPU hotplug race fix"
* 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tools/liblockdep: don't include host headers
tools/liblockdep: ignore generated .so file
smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread()
Diffstat (limited to 'kernel')
-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 f032fb5..40190f2 100644 --- a/kernel/smpboot.c +++ b/kernel/smpboot.c @@ -280,6 +280,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); @@ -292,6 +293,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); |