]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cpuset: Fix the bug that subpart_cpus updated wrongly in update_cpumask()
authorTianchen Ding <dtcccc@linux.alibaba.com>
Tue, 18 Jan 2022 10:05:18 +0000 (18:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Feb 2022 11:39:58 +0000 (12:39 +0100)
commitf0c1ed004ea8845c8f2d69e58641f87a4c4b1408
tree5ec12ee9215e162aaae97c8064e211e1f130a8a4
parented1707d0a64d92432b9fac368983c1b4465220f0
cpuset: Fix the bug that subpart_cpus updated wrongly in update_cpumask()

commit c80d401c52a2d1baf2a5afeb06f0ffe678e56d23 upstream.

subparts_cpus should be limited as a subset of cpus_allowed, but it is
updated wrongly by using cpumask_andnot(). Use cpumask_and() instead to
fix it.

Fixes: ee8dde0cd2ce ("cpuset: Add new v2 cpuset.sched.partition flag")
Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cgroup/cpuset.c