On 9/27/26 9:40 PM, Ridong Chen wrote:
On 9/24/2026 12:27 PM, Hui Peng wrote:
Commit 6da580ec656a ("cgroup/cpuset: Don't allow creation of local
partition over a remote one") added a check in update_prstate() to
reject
creating a top-level local partition whose cs->exclusive_cpus intersects
subpartitions_cpus.
However, if a top-level cgroup A1 has a child A1/A2 enabled as a remote
partition on a subset of its exclusive CPUs (X2-3 on A1, CX2-3:P2 on
A1/A2), and A1 is then set to "root" (P1, becoming "root invalid" via
update_prstate() because its exclusive CPUs intersect
subpartitions_cpus)
followed by expanding its CPUs to include additional non-remote CPUs
(CX1-3), update_cpumask() / update_exclusive_cpumask() calls
validate_partition() without going through update_prstate(). Because
validate_partition() does not check trialcs->exclusive_cpus against
subpartitions_cpus, A1 transitions from "root invalid" to a valid local
partition over the existing remote partition A1/A2 and triggers:
WARNING: kernel/cgroup/cpuset.c:1943 at
update_parent_effective_cpumask+0x189b/0x1fd0
Check trialcs->exclusive_cpus against subpartitions_cpus in
validate_partition() when !is_partition_valid(cs), and add a regression
test case to tools/testing/selftests/cgroup/test_cpuset_prs.sh.
Was this message assisted by an LLM?
It would be helpful if you could provide the reproducer as I replied
earlier, so that it can be understood more easily and tested.
The provided test case for test-cpuset_prs.sh is supposed to be the
reproducer if you don't have deadline task running in the test system or
the kernel includes the last cpuset patch that I sent out.
Cheers,
Longman