diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index d786d45c44d9..921dedde2ee1 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -566,7 +566,7 @@ build_overlap_sched_groups(struct sched_domain *sd, int cpu) cpumask_clear(covered); - for_each_cpu(i, span) { + for_each_cpu_wrap(i, span, cpu) { struct cpumask *sg_span; if (cpumask_test_cpu(i, covered))