From bcfe8c4c06593d744f002a4e5c44f57dd4eb42c6 Mon Sep 17 00:00:00 2001 From: Balazs Gerofi Date: Tue, 3 Jul 2012 17:16:17 +0900 Subject: [PATCH] set tls block base to parent if not specified --- kernel/syscall.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/kernel/syscall.c b/kernel/syscall.c index f23a6bb3..aab0923b 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -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;