|
|
@@ -300,6 +300,14 @@ int copy_thread_tls(unsigned long clone_flags, unsigned long sp,
|
|
|
childregs = task_pt_regs(p);
|
|
|
fork_frame = container_of(childregs, struct fork_frame, regs);
|
|
|
frame = &fork_frame->frame;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * For a new task use the RESET flags value since there is no before.
|
|
|
+ * All the status flags are zero; DF and all the system flags must also
|
|
|
+ * be 0, specifically IF must be 0 because we context switch to the new
|
|
|
+ * task with interrupts disabled.
|
|
|
+ */
|
|
|
+ frame->flags = X86_EFLAGS_FIXED;
|
|
|
frame->bp = 0;
|
|
|
frame->ret_addr = (unsigned long) ret_from_fork;
|
|
|
p->thread.sp = (unsigned long) fork_frame;
|