cgroup/cpuset: Make child cpusets restrict parents on v1 hierarchy
authorMichal Koutný <mkoutny@suse.com>
Fri, 17 Dec 2021 15:48:54 +0000 (16:48 +0100)
committerTejun Heo <tj@kernel.org>
Wed, 12 Jan 2022 21:24:45 +0000 (11:24 -1000)
commitd068eebbd4822b6c14a7ea375dfe53ca5c69c776
tree2aa0efc5e3f19af01134f2af8becab91a08f8cc5
parentdaadb3bd0e8d3e317e36bc2c1542e86c528665e5
cgroup/cpuset: Make child cpusets restrict parents on v1 hierarchy

The commit 1f1562fcd04a ("cgroup/cpuset: Don't let child cpusets
restrict parent in default hierarchy") inteded to relax the check only
on the default hierarchy (or v2 mode) but it dropped the check in v1
too.

This patch returns and separates the legacy-only validations so that
they can be considered only in the v1 mode, which should enforce the old
constraints for the sake of compatibility.

Fixes: 1f1562fcd04a ("cgroup/cpuset: Don't let child cpusets restrict parent in default hierarchy")
Suggested-by: Waiman Long <longman@redhat.com>
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c