X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=kernel%2Fcpuset.c;h=9fceb97e989c25c82e438010437804774b892025;hb=a19214430d27a3af6f1672ec26f3c893ef899ede;hp=039baa4cd90c1109a4c7e2bd382207242ab39f8f;hpb=156a9ea43acb609ac89d48dbb9f0d05ee903a12e;p=linux-2.6 diff --git a/kernel/cpuset.c b/kernel/cpuset.c index 039baa4cd9..9fceb97e98 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c @@ -1037,8 +1037,8 @@ int current_cpuset_is_being_rebound(void) static int update_relax_domain_level(struct cpuset *cs, s64 val) { - if ((int)val < 0) - val = -1; + if (val < -1 || val >= SD_LV_MAX) + return -EINVAL; if (val != cs->relax_domain_level) { cs->relax_domain_level = val; @@ -1890,6 +1890,12 @@ static void common_cpu_mem_hotplug_unplug(void) top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY]; scan_for_empty_cpusets(&top_cpuset); + /* + * Scheduler destroys domains on hotplug events. + * Rebuild them based on the current settings. + */ + rebuild_sched_domains(); + cgroup_unlock(); }