Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Fri, 5 Jan 2018 18:09:39 +0000 (18:09 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 5 Jan 2018 18:09:39 +0000 (18:09 +0000)
commitdd4d6626b29058a51ce755e062f81bc91a3ccc9b
tree0b4e674a0753ff24897ac5c37faf19af586b3d23
parent06edc9e28d73c6ee4d5590d348aa85d8f4afd00e
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