acrn-kernel/kernel/cgroup
Waiman Long 243d9f3a11 cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods
[ Upstream commit eee8785379 ]

In the case of CLONE_INTO_CGROUP, not all cpusets are ready to accept
new tasks. It is too late to check that in cpuset_fork(). So we need
to add the cpuset_can_fork() and cpuset_cancel_fork() methods to
pre-check it before we can allow attachment to a different cpuset.

We also need to set the attach_in_progress flag to alert other code
that a new task is going to be added to the cpuset.

Fixes: ef2c41cf38 ("clone3: allow spawning processes into cgroups")
Suggested-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:35:14 +02:00
..
Makefile
cgroup-internal.h
cgroup-v1.c
cgroup.c
cpuset.c cgroup/cpuset: Add cpuset_can_fork() and cpuset_cancel_fork() methods 2023-04-20 12:35:14 +02:00
debug.c
freezer.c
legacy_freezer.c cgroup,freezer: hold cpu_hotplug_lock before freezer_mutex 2023-04-20 12:35:09 +02:00
misc.c
namespace.c
pids.c
rdma.c
rstat.c cgroup: fix display of forceidle time at root 2023-04-20 12:35:13 +02:00