diff options
author | Oleg Nesterov <oleg@redhat.com> | 2015-11-27 19:57:19 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2015-11-30 09:48:18 -0500 |
commit | c9e75f0492b248aeaa7af8991a6fc9a21506bc96 (patch) | |
tree | 65b6a47aabaa91a19d1f0c01a613d73ab3cecee3 /scripts/objdiff | |
parent | 53254f900bd9ff1e3cc5628e76126bb403d9d160 (diff) | |
download | op-kernel-dev-c9e75f0492b248aeaa7af8991a6fc9a21506bc96.zip op-kernel-dev-c9e75f0492b248aeaa7af8991a6fc9a21506bc96.tar.gz |
cgroup: pids: fix race between cgroup_post_fork() and cgroup_migrate()
If the new child migrates to another cgroup before cgroup_post_fork() calls
subsys->fork(), then both pids_can_attach() and pids_fork() will do the same
pids_uncharge(old_pids) + pids_charge(pids) sequence twice.
Change copy_process() to call threadgroup_change_begin/threadgroup_change_end
unconditionally. percpu_down_read() is cheap and this allows other cleanups,
see the next changes.
Also, this way we can unify cgroup_threadgroup_rwsem and dup_mmap_sem.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/objdiff')
0 files changed, 0 insertions, 0 deletions