Messages in this thread | | | Date | Wed, 17 Aug 2022 07:40:32 -1000 | From | Tejun Heo <> | Subject | Re: [PATCH cgroup/for-6.0-fixes] cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock |
| |
On Mon, Aug 15, 2022 at 01:27:38PM -1000, Tejun Heo wrote: > Bringing up a CPU may involve creating new tasks which requires read-locking > threadgroup_rwsem, so threadgroup_rwsem nests inside cpus_read_lock(). > However, cpuset's ->attach(), which may be called with thredagroup_rwsem > write-locked, also wants to disable CPU hotplug and acquires > cpus_read_lock(), leading to a deadlock. > > Fix it by guaranteeing that ->attach() is always called with CPU hotplug > disabled and removing cpus_read_lock() call from cpuset_attach(). > > Signed-off-by: Tejun Heo <tj@kernel.org>
Applied to cgroup/for-6.0-fixes w/ commit message and comment update suggested by Xuewen and Fixes / stable tags added.
Thanks.
-- tejun
| |