Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Sat, 3 Mar 2018 10:47:56 +0000 (10:47 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sat, 3 Mar 2018 10:47:56 +0000 (10:47 +0000)
commit37adf8a5697474a7cc83c095bcbedeb701d99b4e
tree03d5c3519f22dd114a6a03602c736ddad1c6f37a
parent82872a6316ba1b17f2fa974a77def8e587af34e0
Hurd: fix port leak in TLS

Depending on whether the thread is the main thread or not, the threading
library can have trouble determining whether the thread reference in the
TCB is valid. The simple solution is to let the threading library
initialize the TCB, and use a temporary reference when initializing TLS.

* sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Use a temporary thread
reference.

Gbp-Pq: Topic hurd-i386
Gbp-Pq: Name tg-tls_thread_leak.diff
sysdeps/mach/hurd/i386/tls.h