aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 28a740151988..8ca1a14cdc8c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1123,6 +1123,9 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1123 p->blocked_on = NULL; /* not blocked yet */ 1123 p->blocked_on = NULL; /* not blocked yet */
1124#endif 1124#endif
1125 1125
1126 /* Perform scheduler related setup. Assign this task to a CPU. */
1127 sched_fork(p, clone_flags);
1128
1126 if ((retval = security_task_alloc(p))) 1129 if ((retval = security_task_alloc(p)))
1127 goto bad_fork_cleanup_policy; 1130 goto bad_fork_cleanup_policy;
1128 if ((retval = audit_alloc(p))) 1131 if ((retval = audit_alloc(p)))
@@ -1212,9 +1215,6 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1212 INIT_LIST_HEAD(&p->ptrace_children); 1215 INIT_LIST_HEAD(&p->ptrace_children);
1213 INIT_LIST_HEAD(&p->ptrace_list); 1216 INIT_LIST_HEAD(&p->ptrace_list);
1214 1217
1215 /* Perform scheduler related setup. Assign this task to a CPU. */
1216 sched_fork(p, clone_flags);
1217
1218 /* Now that the task is set up, run cgroup callbacks if 1218 /* Now that the task is set up, run cgroup callbacks if
1219 * necessary. We need to run them before the task is visible 1219 * necessary. We need to run them before the task is visible
1220 * on the tasklist. */ 1220 * on the tasklist. */