set tls block base to parent if not specified

This commit is contained in:
Balazs Gerofi
2012-07-03 17:16:17 +09:00
parent 02aa7ed213
commit bcfe8c4c06

View File

@@ -493,11 +493,12 @@ SYSCALL_DECLARE(clone)
dkprintf("clone_flags & CLONE_SETTLS: 0x%lX\n",
(unsigned long)aal_mc_syscall_arg4(ctx));
new->thread.tlsblock_base
= (unsigned long)aal_mc_syscall_arg4(ctx);
new->thread.tlsblock_base =
(unsigned long)aal_mc_syscall_arg4(ctx);
}
else {
new->thread.tlsblock_base = 0;
new->thread.tlsblock_base =
cpu_local_var(current)->thread.tlsblock_base;
}
aal_mc_syscall_ret(new->uctx) = 0;