Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334800
b: refs/heads/master
c: d878383
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed Oct 19, 2012
1 parent 3e863a1 commit 1123e17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bb71308b8133d643648776243e4d5599b1c193d
refs/heads/master: d87838321124061f6c935069d97f37010fa417e6
15 changes: 3 additions & 12 deletions trunk/kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -4883,19 +4883,10 @@ void cgroup_post_fork(struct task_struct *child)
*/
if (use_task_css_set_links) {
write_lock(&css_set_lock);
if (list_empty(&child->cg_list)) {
/*
* It's safe to use child->cgroups without task_lock()
* here because we are protected through
* threadgroup_change_begin() against concurrent
* css_set change in cgroup_task_migrate(). Also
* the task can't exit at that point until
* wake_up_new_task() is called, so we are protected
* against cgroup_exit() setting child->cgroup to
* init_css_set.
*/
task_lock(child);
if (list_empty(&child->cg_list))
list_add(&child->cg_list, &child->cgroups->tasks);
}
task_unlock(child);
write_unlock(&css_set_lock);
}
}
Expand Down

0 comments on commit 1123e17

Please sign in to comment.