diff options
-rw-r--r-- | kernel/cgroup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 220e0fd659fa..d7ab4ffd8fd9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -2792,8 +2792,10 @@ void cgroup_post_fork(struct task_struct *child) | |||
2792 | { | 2792 | { |
2793 | if (use_task_css_set_links) { | 2793 | if (use_task_css_set_links) { |
2794 | write_lock(&css_set_lock); | 2794 | write_lock(&css_set_lock); |
2795 | task_lock(child); | ||
2795 | if (list_empty(&child->cg_list)) | 2796 | if (list_empty(&child->cg_list)) |
2796 | list_add(&child->cg_list, &child->cgroups->tasks); | 2797 | list_add(&child->cg_list, &child->cgroups->tasks); |
2798 | task_unlock(child); | ||
2797 | write_unlock(&css_set_lock); | 2799 | write_unlock(&css_set_lock); |
2798 | } | 2800 | } |
2799 | } | 2801 | } |