]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup/cpuset: Don't let child cpusets restrict parent in default hierarchy
authorWaiman Long <longman@redhat.com>
Sun, 5 Dec 2021 18:32:14 +0000 (13:32 -0500)
committerTejun Heo <tj@kernel.org>
Mon, 13 Dec 2021 20:41:02 +0000 (10:41 -1000)
commit4c6ede62955e480907285b4527923cd5c83b156d
treef20518df28deb5d25068b6b201975f7b01d42c8a
parent779e2e77ec236166e76005042a23863f428c94ed
cgroup/cpuset: Don't let child cpusets restrict parent in default hierarchy

In validate_change(), there is a check since v2.6.12 to make sure that
each of the child cpusets must be a subset of a parent cpuset.  IOW, it
allows child cpusets to restrict what changes can be made to a parent's
"cpuset.cpus". This actually violates one of the core principles of the
default hierarchy where a cgroup higher up in the hierarchy should be
able to change configuration however it sees fit as deligation breaks
down otherwise.

To address this issue, the check is now removed for the default hierarchy
to free parent cpusets from being restricted by child cpusets. The
check will still apply for legacy hierarchy.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c