diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:58:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-10 19:58:10 -0700 |
commit | 991ec02cdca33b03a132a0cacfe6f0aa0be9aa8d (patch) | |
tree | 50b5f4e2b9f138da57f76eca44fdcc80a2fcd428 /kernel/fork.c | |
parent | 862366118026a358882eefc70238dbcc3db37aac (diff) | |
parent | 84047e360af0394ac5861d433f26bbcf30f77dd1 (diff) |
Merge branch 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
function-graph: always initialize task ret_stack
function-graph: move initialization of new tasks up in fork
function-graph: add memory barriers for accessing task's ret_stack
function-graph: enable the stack after initialization of other variables
function-graph: only allocate init tasks if it was not already done
Manually fix trivial conflict in kernel/trace/ftrace.c
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, if (!p) goto fork_out; + ftrace_graph_init_task(p); + rt_mutex_init_task(p); #ifdef CONFIG_PROVE_LOCKING @@ -1130,8 +1132,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, } } - ftrace_graph_init_task(p); - p->pid = pid_nr(pid); p->tgid = p->pid; if (clone_flags & CLONE_THREAD) @@ -1140,7 +1140,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, if (current->nsproxy != p->nsproxy) { retval = ns_cgroup_clone(p, pid); if (retval) - goto bad_fork_free_graph; + goto bad_fork_free_pid; } 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, spin_unlock(¤t->sighand->siglock); write_unlock_irq(&tasklist_lock); retval = -ERESTARTNOINTR; - goto bad_fork_free_graph; + goto bad_fork_free_pid; } if (clone_flags & CLONE_THREAD) { @@ -1267,8 +1267,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, cgroup_post_fork(p); return p; -bad_fork_free_graph: - ftrace_graph_exit_task(p); bad_fork_free_pid: if (pid != &init_struct_pid) free_pid(pid); |