diff options
author | Ben Blum <[email protected]> | 2011-11-02 13:38:07 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-11-02 16:06:59 -0700 |
commit | 77ceab8ea590d7dc6c8f055ce43dfebd74428107 (patch) | |
tree | b2ef5e5baca4579565ab9bf527e965dd9b93a25a /tools/perf/scripts/python/syscall-counts.py | |
parent | 33ef6b6984403a688189317ef46bb3caab3b70e0 (diff) |
cgroups: don't attach task to subsystem if migration failed
If a task has exited to the point it has called cgroup_exit() already,
then we can't migrate it to another cgroup anymore.
This can happen when we are attaching a task to a new cgroup between the
call to ->can_attach_task() on subsystems and the migration that is
eventually tried in cgroup_task_migrate().
In this case cgroup_task_migrate() returns -ESRCH and we don't want to
attach the task to the subsystems because the attachment to the new cgroup
itself failed.
Fix this by only calling ->attach_task() on the subsystems if the cgroup
migration succeeded.
Reported-by: Oleg Nesterov <[email protected]>
Signed-off-by: Ben Blum <[email protected]>
Acked-by: Paul Menage <[email protected]>
Cc: Li Zefan <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions