Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Sun, 28 May 2017 17:29:33 +0000 (17:29 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sun, 28 May 2017 17:29:33 +0000 (17:29 +0000)
commitab5fe6c3879d37568eacad6c24f17e17e739ea6f
tree6e831b648991858d5b2322416d6c2e20742350ed
parentd7c02f08bc818fbf417f1a2257f8af7908c4348d
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