Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Sun, 4 Dec 2016 21:49:53 +0000 (21:49 +0000)
committerSamuel Thibault <sthibault@debian.org>
Sun, 4 Dec 2016 21:49:53 +0000 (21:49 +0000)
commit04b69ac1c02757ba00cd7f47fb136a899e22a9d7
treeab1727b1b03def82451a5a2324622bd316362bc2
parent40fb27e5946c35c8961d34f8f0dcbd932687608e
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