]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cgroup/cpuset: Fix violation of cpuset locking rule
authorWaiman Long <longman@redhat.com>
Tue, 20 Jul 2021 14:18:28 +0000 (10:18 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Sep 2021 07:50:38 +0000 (09:50 +0200)
commit10dfcfda5c6f532726caf3b0e63a6d705592942b
treef55c90eee7dcbb9edc150195f0705cd7ff7184da
parentcbc97661439d9dd7693ebd6b9d7b8f5c4084e7e8
cgroup/cpuset: Fix violation of cpuset locking rule

[ Upstream commit 6ba34d3c73674e46d9e126e4f0cee79e5ef2481c ]

The cpuset fields that manage partition root state do not strictly
follow the cpuset locking rule that update to cpuset has to be done
with both the callback_lock and cpuset_mutex held. This is now fixed
by making sure that the locking rule is upheld.

Fixes: 3881b86128d0 ("cpuset: Add an error state to cpuset.sched.partition")
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/cgroup/cpuset.c