summaryrefslogtreecommitdiff
path: root/tools/testing
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2026-10-25 17:44:45 -0400
committerTejun Heo <tj@kernel.org>2026-10-26 07:44:28 -1000
commit356a3aa7404e420e6f19c5ed42db7b8bd0c7ee9f (patch)
tree592ea157f9c1dc8104212c15358f79f3942d60e5 /tools/testing
parent10a6f00d82544a1baa901de8d28f41f28c364995 (diff)
cgroup/cpuset: Make sure compute_partition_effective_cpumask() is only called for valid partition
With visual inspection to make sure that compute_partition_effective_cpumask() is only called for valid partition root, it was found that the function can be called for an invalidated partition near the end of cpuset_hotplug_update_tasks(). When partcmd is set, update_parent_effective_cpumask() is called to either invalidate a valid partition or with partcmd_update to check if an invalid partition can be switched back to valid. In both cases, cpuset_force_rebuild() should be invoked. However, compute_partition_effective_cpumask() should only be called when an invalid partition is switched back to valid. When a partition is invalidated, compute_effective_cpumask() should be called instead. Also add a WARN_ON_ONCE() in compute_partition_effective_cpumask() to ensure that a valid partition root is passed in. Fixes: 72c6303acfa1 ("cgroup/cpuset: Take isolated CPUs out of workqueue unbound cpumask") Signed-off-by: Waiman Long <longman@redhat.com> Acked-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'tools/testing')
0 files changed, 0 insertions, 0 deletions