|
@@ -5859,11 +5859,14 @@ void __init sched_init_smp(void)
|
|
/*
|
|
/*
|
|
* There's no userspace yet to cause hotplug operations; hence all the
|
|
* There's no userspace yet to cause hotplug operations; hence all the
|
|
* CPU masks are stable and all blatant races in the below code cannot
|
|
* CPU masks are stable and all blatant races in the below code cannot
|
|
- * happen.
|
|
|
|
|
|
+ * happen. The hotplug lock is nevertheless taken to satisfy lockdep,
|
|
|
|
+ * but there won't be any contention on it.
|
|
*/
|
|
*/
|
|
|
|
+ cpus_read_lock();
|
|
mutex_lock(&sched_domains_mutex);
|
|
mutex_lock(&sched_domains_mutex);
|
|
sched_init_domains(cpu_active_mask);
|
|
sched_init_domains(cpu_active_mask);
|
|
mutex_unlock(&sched_domains_mutex);
|
|
mutex_unlock(&sched_domains_mutex);
|
|
|
|
+ cpus_read_unlock();
|
|
|
|
|
|
/* Move init over to a non-isolated CPU */
|
|
/* Move init over to a non-isolated CPU */
|
|
if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0)
|
|
if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0)
|