]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains
authorWaiman Long <longman@redhat.com>
Thu, 5 Dec 2024 19:51:01 +0000 (14:51 -0500)
committerTejun Heo <tj@kernel.org>
Wed, 11 Dec 2024 15:45:52 +0000 (05:45 -1000)
commit9b496a8bbed9cc292b0dfd796f38ec58b6d0375f
treeb09f4b2f8dcb6909152bc64743b3b38ef6b7df07
parenteb1dd15fb26d9ad85204f444ef03f29f9049eb1e
cgroup/cpuset: Prevent leakage of isolated CPUs into sched domains

Isolated CPUs are not allowed to be used in a non-isolated partition.
The only exception is the top cpuset which is allowed to contain boot
time isolated CPUs.

Commit ccac8e8de99c ("cgroup/cpuset: Fix remote root partition creation
problem") introduces a simplified scheme of including only partition
roots in sched domain generation. However, it does not properly account
for this exception case. This can result in leakage of isolated CPUs
into a sched domain.

Fix it by making sure that isolated CPUs are excluded from the top
cpuset before generating sched domains.

Also update the way the boot time isolated CPUs are handled in
test_cpuset_prs.sh to make sure that those isolated CPUs are really
isolated instead of just skipping them in the tests.

Fixes: ccac8e8de99c ("cgroup/cpuset: Fix remote root partition creation problem")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c
tools/testing/selftests/cgroup/test_cpuset_prs.sh