diff options
| author | 2012-07-21 23:07:33 +0200 | |
|---|---|---|
| committer | 2012-07-21 23:07:33 +0200 | |
| commit | 608f593b1313080301b76875487af6da508f67a1 (patch) | |
| tree | b775454cd4d1d380134c2d91ff79d0375987dc64 /kernel/fork.c | |
| parent | Merge branch 'next/board-samsung-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/boards (diff) | |
| parent | Linux 3.5-rc7 (diff) | |
| download | wireguard-linux-608f593b1313080301b76875487af6da508f67a1.tar.xz wireguard-linux-608f593b1313080301b76875487af6da508f67a1.zip | |
Merge tag 'v3.5-rc7' into next/boards
Linux 3.5-rc7
Prerequisite for samsung/board3 branch.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to '')
| -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); |
