aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index a288da176e46..00d5136d38c2 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2903,6 +2903,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
2903 mutex_unlock(&cgroup_mutex); 2903 mutex_unlock(&cgroup_mutex);
2904 return 0; 2904 return 0;
2905 } 2905 }
2906 task_lock(tsk);
2906 cg = tsk->cgroups; 2907 cg = tsk->cgroups;
2907 parent = task_cgroup(tsk, subsys->subsys_id); 2908 parent = task_cgroup(tsk, subsys->subsys_id);
2908 2909
@@ -2915,6 +2916,7 @@ int cgroup_clone(struct task_struct *tsk, struct cgroup_subsys *subsys,
2915 2916
2916 /* Keep the cgroup alive */ 2917 /* Keep the cgroup alive */
2917 get_css_set(cg); 2918 get_css_set(cg);
2919 task_unlock(tsk);
2918 mutex_unlock(&cgroup_mutex); 2920 mutex_unlock(&cgroup_mutex);
2919 2921
2920 /* Now do the VFS work to create a cgroup */ 2922 /* Now do the VFS work to create a cgroup */