From e8604cb43690b781f9a7ad4a770f3e10259fe939 Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Fri, 28 Mar 2014 15:18:27 +0800 Subject: 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 Signed-off-by: Li Zefan Signed-off-by: Tejun Heo --- kernel/cgroup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'kernel/cgroup.c') 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) * notify_on_release(), then leave the task attached to the root cgroup in * each hierarchy for the remainder of its exit. No need to bother with * init_css_set refcnting. init_css_set never goes away and we can't race - * with migration path - either PF_EXITING is visible to migration path or - * @tsk never got on the tasklist. + * with migration path - PF_EXITING is visible to migration path. */ void cgroup_exit(struct task_struct *tsk, int run_callbacks) { -- cgit v1.2.2