diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index c33d70215079d1df1ec2b2a6a4089c6950222137..3173fe47380aaaf61c90f7e520ab63a4b2b12587 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -1539,16 +1539,16 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs, return retval; } - if (!cpumask_subset(trialcs->cpus_requested, top_cpuset.cpus_requested)) + if (!cpumask_subset(trialcs->cpus_requested, cpu_present_mask)) return -EINVAL; + cpumask_and(trialcs->cpus_allowed, trialcs->cpus_requested, + cpu_active_mask); + /* Nothing to do if the cpus didn't change */ if (cpumask_equal(cs->cpus_requested, trialcs->cpus_requested)) return 0; - cpumask_and(trialcs->cpus_allowed, trialcs->cpus_requested, - cpu_active_mask); - retval = validate_change(cs, trialcs); if (retval < 0) return retval;