Commit e2982a04ede454b23ea2f5af11ba4d77d8a70155
Exists in
smarc-imx_3.14.28_1.0.0_ga
and in
1 other branch
Merge branch 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fix from Tejun Heo: "A late fix for cgroup. This fixes a behavior regression visible to userland which was created by a commit merged during -rc1. While the behavior change isn't too likely to be noticeable, the fix is relatively low risk and we'll need to backport it through -stable anyway if the bug gets released" * 'for-3.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cpuset: fix a regression in validating config change
Showing 1 changed file Side-by-side Diff
kernel/cpuset.c
... | ... | @@ -475,13 +475,17 @@ |
475 | 475 | |
476 | 476 | /* |
477 | 477 | * Cpusets with tasks - existing or newly being attached - can't |
478 | - * have empty cpus_allowed or mems_allowed. | |
478 | + * be changed to have empty cpus_allowed or mems_allowed. | |
479 | 479 | */ |
480 | 480 | ret = -ENOSPC; |
481 | - if ((cgroup_task_count(cur->css.cgroup) || cur->attach_in_progress) && | |
482 | - (cpumask_empty(trial->cpus_allowed) && | |
483 | - nodes_empty(trial->mems_allowed))) | |
484 | - goto out; | |
481 | + if ((cgroup_task_count(cur->css.cgroup) || cur->attach_in_progress)) { | |
482 | + if (!cpumask_empty(cur->cpus_allowed) && | |
483 | + cpumask_empty(trial->cpus_allowed)) | |
484 | + goto out; | |
485 | + if (!nodes_empty(cur->mems_allowed) && | |
486 | + nodes_empty(trial->mems_allowed)) | |
487 | + goto out; | |
488 | + } | |
485 | 489 | |
486 | 490 | ret = 0; |
487 | 491 | out: |