aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c3
-rw-r--r--kernel/fork.c5
2 files changed, 3 insertions, 5 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{
diff --git a/kernel/fork.c b/kernel/fork.c
index a17621c6cd42..8852b3463ab7 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1271,7 +1271,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1271 if (IS_ERR(p->mempolicy)) { 1271 if (IS_ERR(p->mempolicy)) {
1272 retval = PTR_ERR(p->mempolicy); 1272 retval = PTR_ERR(p->mempolicy);
1273 p->mempolicy = NULL; 1273 p->mempolicy = NULL;
1274 goto bad_fork_cleanup_cgroup; 1274 goto bad_fork_cleanup_threadgroup_lock;
1275 } 1275 }
1276 mpol_fix_fork_child_flag(p); 1276 mpol_fix_fork_child_flag(p);
1277#endif 1277#endif
@@ -1524,11 +1524,10 @@ bad_fork_cleanup_policy:
1524 perf_event_free_task(p); 1524 perf_event_free_task(p);
1525#ifdef CONFIG_NUMA 1525#ifdef CONFIG_NUMA
1526 mpol_put(p->mempolicy); 1526 mpol_put(p->mempolicy);
1527bad_fork_cleanup_cgroup: 1527bad_fork_cleanup_threadgroup_lock:
1528#endif 1528#endif
1529 if (clone_flags & CLONE_THREAD) 1529 if (clone_flags & CLONE_THREAD)
1530 threadgroup_change_end(current); 1530 threadgroup_change_end(current);
1531 cgroup_exit(p, 0);
1532 delayacct_tsk_free(p); 1531 delayacct_tsk_free(p);
1533 module_put(task_thread_info(p)->exec_domain->module); 1532 module_put(task_thread_info(p)->exec_domain->module);
1534bad_fork_cleanup_count: 1533bad_fork_cleanup_count: