cgroup/cpuset: Fix a partition bug with hotplug
authorWaiman Long <longman@redhat.com>
Tue, 20 Jul 2021 14:18:27 +0000 (10:18 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 26 Jul 2021 22:59:05 +0000 (12:59 -1000)
commit15d428e6fe77fffc3f4fff923336036f5496ef17
treefeee2b28339093b7f3a76d762080d22d7c243716
parent0f3adb8a1e5f36e792598c1d77a2cfac9c90a4f9
cgroup/cpuset: Fix a partition bug with hotplug

In cpuset_hotplug_workfn(), the detection of whether the cpu list
has been changed is done by comparing the effective cpus of the top
cpuset with the cpu_active_mask. However, in the rare case that just
all the CPUs in the subparts_cpus are offlined, the detection fails
and the partition states are not updated correctly. Fix it by forcing
the cpus_updated flag to true in this particular case.

Fixes: 4b842da276a8 ("cpuset: Make CPU hotplug work with partition")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c