Commit 35cc9f80 authored by Richard Henderson's avatar Richard Henderson Committed by Richard Henderson

Don't clear pcb.unique if CLONE_SETTLS is not set.

parent 8fdb40a2
...@@ -315,7 +315,13 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, ...@@ -315,7 +315,13 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
/* Set a new TLS for the child thread? Peek back into the /* Set a new TLS for the child thread? Peek back into the
syscall arguments that we saved on syscall entry. */ syscall arguments that we saved on syscall entry. */
childti->pcb.unique = (clone_flags & CLONE_SETTLS ? regs->r19 : 0); /* Note: if CLONE_SETTLS is not set, then we must inherit the
value from the parent, which will have been set by the block
copy in dup_task_struct. This is non-intuitive, but is
required for proper operation in the case of a threaded
application calling fork. */
if (clone_flags & CLONE_SETTLS)
childti->pcb.unique = regs->r19;
return 0; return 0;
} }
......
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