diff options
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 5449efbc6427..bb762b4dd217 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -981,6 +981,8 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
981 | if (!p) | 981 | if (!p) |
982 | goto fork_out; | 982 | goto fork_out; |
983 | 983 | ||
984 | ftrace_graph_init_task(p); | ||
985 | |||
984 | rt_mutex_init_task(p); | 986 | rt_mutex_init_task(p); |
985 | 987 | ||
986 | #ifdef CONFIG_PROVE_LOCKING | 988 | #ifdef CONFIG_PROVE_LOCKING |
@@ -1130,8 +1132,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1130 | } | 1132 | } |
1131 | } | 1133 | } |
1132 | 1134 | ||
1133 | ftrace_graph_init_task(p); | ||
1134 | |||
1135 | p->pid = pid_nr(pid); | 1135 | p->pid = pid_nr(pid); |
1136 | p->tgid = p->pid; | 1136 | p->tgid = p->pid; |
1137 | if (clone_flags & CLONE_THREAD) | 1137 | if (clone_flags & CLONE_THREAD) |
@@ -1140,7 +1140,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1140 | if (current->nsproxy != p->nsproxy) { | 1140 | if (current->nsproxy != p->nsproxy) { |
1141 | retval = ns_cgroup_clone(p, pid); | 1141 | retval = ns_cgroup_clone(p, pid); |
1142 | if (retval) | 1142 | if (retval) |
1143 | goto bad_fork_free_graph; | 1143 | goto bad_fork_free_pid; |
1144 | } | 1144 | } |
1145 | 1145 | ||
1146 | p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; | 1146 | p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL; |
@@ -1232,7 +1232,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1232 | spin_unlock(¤t->sighand->siglock); | 1232 | spin_unlock(¤t->sighand->siglock); |
1233 | write_unlock_irq(&tasklist_lock); | 1233 | write_unlock_irq(&tasklist_lock); |
1234 | retval = -ERESTARTNOINTR; | 1234 | retval = -ERESTARTNOINTR; |
1235 | goto bad_fork_free_graph; | 1235 | goto bad_fork_free_pid; |
1236 | } | 1236 | } |
1237 | 1237 | ||
1238 | if (clone_flags & CLONE_THREAD) { | 1238 | if (clone_flags & CLONE_THREAD) { |
@@ -1267,8 +1267,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1267 | cgroup_post_fork(p); | 1267 | cgroup_post_fork(p); |
1268 | return p; | 1268 | return p; |
1269 | 1269 | ||
1270 | bad_fork_free_graph: | ||
1271 | ftrace_graph_exit_task(p); | ||
1272 | bad_fork_free_pid: | 1270 | bad_fork_free_pid: |
1273 | if (pid != &init_struct_pid) | 1271 | if (pid != &init_struct_pid) |
1274 | free_pid(pid); | 1272 | free_pid(pid); |