Commit 87bec58a authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

revert "sched: Fix fork() error path to not crash"

To make way for "fork: fix error handling in dup_task()", which fixes the
errors more completely.

Cc: Salman Qazi <sqazi@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent b2412b7f
...@@ -304,17 +304,12 @@ static struct task_struct *dup_task_struct(struct task_struct *orig) ...@@ -304,17 +304,12 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
} }
err = arch_dup_task_struct(tsk, orig); err = arch_dup_task_struct(tsk, orig);
/*
* 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) if (err)
goto out; goto out;
tsk->stack = ti;
setup_thread_stack(tsk, orig);
clear_user_return_notifier(tsk); clear_user_return_notifier(tsk);
clear_tsk_need_resched(tsk); clear_tsk_need_resched(tsk);
stackend = end_of_stack(tsk); stackend = end_of_stack(tsk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment