linux-stable/kernel/cgroup
Waiman Long 37a3cf4abc cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach()
commit ba9182a896 upstream.

After a successful cpuset_can_attach() call which increments the
attach_in_progress flag, either cpuset_cancel_attach() or cpuset_attach()
will be called later. In cpuset_attach(), tasks in cpuset_attach_wq,
if present, will be woken up at the end. That is not the case in
cpuset_cancel_attach(). So missed wakeup is possible if the attach
operation is somehow cancelled. Fix that by doing the wakeup in
cpuset_cancel_attach() as well.

Fixes: e44193d39e ("cpuset: let hotplug propagation work wait for task attaching")
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 12:10:27 +02:00
..
cgroup-internal.h memcg: fix possible use-after-free in memcg_write_event_control() 2022-12-14 11:31:57 +01:00
cgroup-v1.c cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all() 2022-09-23 14:17:00 +02:00
cgroup.c cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock 2022-09-15 11:32:04 +02:00
cpuset.c cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach() 2023-04-20 12:10:27 +02:00
debug.c kernel: cgroup: fix misuse of %x 2019-05-06 08:47:48 -07:00
freezer.c cgroup: freezer: don't change task and cgroups status unnecessarily 2019-11-07 07:38:41 -08:00
legacy_freezer.c cgroup: rename freezer.c into legacy_freezer.c 2019-04-19 11:26:48 -07:00
Makefile cgroup: cgroup v2 freezer 2019-04-19 11:26:48 -07:00
namespace.c nsproxy: add struct nsset 2020-05-09 13:57:12 +02:00
pids.c clone3: allow spawning processes into cgroups 2020-02-12 17:57:51 -05:00
rdma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 451 2019-06-19 17:09:08 +02:00
rstat.c cgroup: Fix rootcg cpu.stat guest double counting 2021-11-18 14:04:13 +01:00