hurd: Don't migrate reply port into __init1_tcbhead
authorSergey Bugaev <bugaevc@gmail.com>
Thu, 20 Apr 2023 18:42:19 +0000 (21:42 +0300)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Fri, 21 Apr 2023 01:02:04 +0000 (03:02 +0200)
commit8e78a2e1d166411a1243e505d036e85e4a7ff17f
treea5d270f3baad166aeed81481a5b39ce71b18497c
parent88cc282a9a694d3c4f3636d6d518f9f0dac76b73
hurd: Don't migrate reply port into __init1_tcbhead

Properly differentiate between setting up the real TLS with
TLS_INIT_TP, and setting up the early TLS (__init1_tcbhead) in static
builds. In the latter case, don't yet migrate the reply port into the
TCB, and don't yet set __libc_tls_initialized to 1.

This also lets us move the __init1_desc assignment inside
_hurd_tls_init ().

Fixes cd019ddd892e182277fadd6aedccc57fa3923c8d
"hurd: Don't leak __hurd_reply_port0"

Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
sysdeps/mach/hurd/i386/tls.h
sysdeps/mach/hurd/x86/init-first.c
sysdeps/mach/hurd/x86_64/tls.h