aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d29950a60411..374f42170d6d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5326,11 +5326,12 @@ static void init_sched_domain_sysctl(void)
5326 5326
5327 sd_ctl_dir[0].child = entry; 5327 sd_ctl_dir[0].child = entry;
5328 5328
5329 for (i = 0; i < cpu_num; i++, entry++) { 5329 for_each_online_cpu(i) {
5330 snprintf(buf, 32, "cpu%d", i); 5330 snprintf(buf, 32, "cpu%d", i);
5331 entry->procname = kstrdup(buf, GFP_KERNEL); 5331 entry->procname = kstrdup(buf, GFP_KERNEL);
5332 entry->mode = 0555; 5332 entry->mode = 0555;
5333 entry->child = sd_alloc_ctl_cpu_table(i); 5333 entry->child = sd_alloc_ctl_cpu_table(i);
5334 entry++;
5334 } 5335 }
5335 sd_sysctl_header = register_sysctl_table(sd_ctl_root); 5336 sd_sysctl_header = register_sysctl_table(sd_ctl_root);
5336} 5337}