diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2016-07-15 06:35:51 -0500 |
|---|---|---|
| committer | Neeraj Upadhyay <neeraju@codeaurora.org> | 2017-09-18 11:34:17 +0530 |
| commit | 5720436329f34b264f3f038f738f870f98b001b4 (patch) | |
| tree | 69f4bb62773452f60d69bc7934e715ac8a475cfb /tools/perf/scripts/python | |
| parent | 3f06fc9b4a9a547831435fc28d4e6e3d37d05528 (diff) | |
cgroupns: Close race between cgroup_post_fork and copy_cgroup_ns
In most code paths involving cgroup migration cgroup_threadgroup_rwsem
is taken. There are two exceptions:
- remove_tasks_in_empty_cpuset calls cgroup_transfer_tasks
- vhost_attach_cgroups_work calls cgroup_attach_task_all
With cgroup_threadgroup_rwsem held it is guaranteed that cgroup_post_fork
and copy_cgroup_ns will reference the same css_set from the process calling
fork.
Without such an interlock there process after fork could reference one
css_set from it's new cgroup namespace and another css_set from
task->cgroups, which semantically is nonsensical.
Change-Id: Iadec82bd07a43bf7cefcf8fc17603700fd4895c3
Cc: stable@vger.kernel.org
Fixes: a79a908fd2b0 ("cgroup: introduce cgroup namespaces")
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Git-commit: eedd0f4cbf5f3b81e82649832091e1d9d53f0709
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
