]> git.baikalelectronics.ru Git - kernel.git/commit
cgroup/cpuset: Fix a partition bug with hotplug
authorWaiman Long <longman@redhat.com>
Tue, 20 Jul 2021 14:18:27 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:47:32 +0000 (09:47 +0200)
commit4bb482bb13fe986d4949cdd64ca4c4b8d2ad1517
treecd891d44f0b3a2b16ab84152322b531282842677
parentdb7c13aa3a4f85b3de8c0d86b772290a3bd1905b
cgroup/cpuset: Fix a partition bug with hotplug

[ Upstream commit 15d428e6fe77fffc3f4fff923336036f5496ef17 ]

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: a16c34244532 ("cpuset: Make CPU hotplug work with partition")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/cpuset.c