aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2014-03-28 03:18:27 -0400
committerTejun Heo <tj@kernel.org>2014-03-29 09:15:53 -0400
commite8604cb43690b781f9a7ad4a770f3e10259fe939 (patch)
tree0feff5f9e9efe957a6f74a2cb23dc753428d87de /kernel/cgroup.c
parent01a971406177c2ca9834be6914a67e20f463a3e6 (diff)
cgroup: fix spurious lockdep warning in cgroup_exit()
cgroup_exit() is called in fork and exit path. If it's called in the failure path during fork, PF_EXITING isn't set, and then lockdep will complain. Fix this by removing cgroup_exit() in that failure path. cgroup_fork() does nothing that needs cleanup. Reported-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index e378cb2fac5e..60fd6f1f6d4e 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -4431,8 +4431,7 @@ void cgroup_post_fork(struct task_struct *child)
4431 * notify_on_release(), then leave the task attached to the root cgroup in 4431 * notify_on_release(), then leave the task attached to the root cgroup in
4432 * each hierarchy for the remainder of its exit. No need to bother with 4432 * each hierarchy for the remainder of its exit. No need to bother with
4433 * init_css_set refcnting. init_css_set never goes away and we can't race 4433 * init_css_set refcnting. init_css_set never goes away and we can't race
4434 * with migration path - either PF_EXITING is visible to migration path or 4434 * with migration path - PF_EXITING is visible to migration path.
4435 * @tsk never got on the tasklist.
4436 */ 4435 */
4437void cgroup_exit(struct task_struct *tsk, int run_callbacks) 4436void cgroup_exit(struct task_struct *tsk, int run_callbacks)
4438{ 4437{