diff options
| -rw-r--r-- | kernel/sched/core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index fd2fce8a001b..02a20ef196a6 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -5859,11 +5859,14 @@ void __init sched_init_smp(void) | |||
| 5859 | /* | 5859 | /* |
| 5860 | * There's no userspace yet to cause hotplug operations; hence all the | 5860 | * There's no userspace yet to cause hotplug operations; hence all the |
| 5861 | * CPU masks are stable and all blatant races in the below code cannot | 5861 | * CPU masks are stable and all blatant races in the below code cannot |
| 5862 | * happen. | 5862 | * happen. The hotplug lock is nevertheless taken to satisfy lockdep, |
| 5863 | * but there won't be any contention on it. | ||
| 5863 | */ | 5864 | */ |
| 5865 | cpus_read_lock(); | ||
| 5864 | mutex_lock(&sched_domains_mutex); | 5866 | mutex_lock(&sched_domains_mutex); |
| 5865 | sched_init_domains(cpu_active_mask); | 5867 | sched_init_domains(cpu_active_mask); |
| 5866 | mutex_unlock(&sched_domains_mutex); | 5868 | mutex_unlock(&sched_domains_mutex); |
| 5869 | cpus_read_unlock(); | ||
| 5867 | 5870 | ||
| 5868 | /* Move init over to a non-isolated CPU */ | 5871 | /* Move init over to a non-isolated CPU */ |
| 5869 | if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0) | 5872 | if (set_cpus_allowed_ptr(current, housekeeping_cpumask(HK_FLAG_DOMAIN)) < 0) |
