cgroup/cpuset: Fix violation of cpuset locking rule
authorWaiman Long <longman@redhat.com>
Tue, 20 Jul 2021 14:18:28 +0000 (10:18 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 9 Aug 2021 22:53:19 +0000 (12:53 -1000)
commit6ba34d3c73674e46d9e126e4f0cee79e5ef2481c
tree82c58ac7b779a75310fe984f4e2d30e9cd98e776
parent15d428e6fe77fffc3f4fff923336036f5496ef17
cgroup/cpuset: Fix violation of cpuset locking rule

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>
kernel/cgroup/cpuset.c