diff options
| author | 2012-07-16 12:32:42 -0700 | |
|---|---|---|
| committer | 2012-07-16 12:32:42 -0700 | |
| commit | 467a3ca5cab64a16b5ec46ebb1895c84c280dcfe (patch) | |
| tree | 68096d5b17e884d270420d50e466186c73019830 /kernel/fork.c | |
| parent | tty ldisc: Close/Reopen race prevention should check the proper flag (diff) | |
| parent | Linux 3.5-rc7 (diff) | |
| download | linux-dev-467a3ca5cab64a16b5ec46ebb1895c84c280dcfe.tar.xz linux-dev-467a3ca5cab64a16b5ec46ebb1895c84c280dcfe.zip | |
Merge branch 'v3.6-rc7' into tty-next
This is to sync up on Linus's branch to get the other tty and core changes.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index ab5211b9e622..f00e319d8376 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -304,12 +304,17 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) } err = arch_dup_task_struct(tsk, orig); - if (err) - goto out; + /* + * We defer looking at err, because we will need this setup + * for the clean up path to work correctly. + */ tsk->stack = ti; - setup_thread_stack(tsk, orig); + + if (err) + goto out; + clear_user_return_notifier(tsk); clear_tsk_need_resched(tsk); stackend = end_of_stack(tsk); |
