sched/isolcpus: Output warning when the 'isolcpus=' kernel parameter is invalid
[deliverable/linux.git] / kernel / sched / core.c
index 9503d590e5ef5b81537947b9925ecfe689f72a91..24fcdbf28b18a6dc23a32f651e3fc6f6918d90f6 100644 (file)
@@ -6173,11 +6173,16 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu)
 /* Setup the mask of cpus configured for isolated domains */
 static int __init isolated_cpu_setup(char *str)
 {
+       int ret;
+
        alloc_bootmem_cpumask_var(&cpu_isolated_map);
-       cpulist_parse(str, cpu_isolated_map);
+       ret = cpulist_parse(str, cpu_isolated_map);
+       if (ret) {
+               pr_err("sched: Error, all isolcpus= values must be between 0 and %d\n", nr_cpu_ids);
+               return 0;
+       }
        return 1;
 }
-
 __setup("isolcpus=", isolated_cpu_setup);
 
 struct s_data {
This page took 0.025397 seconds and 5 git commands to generate.