Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
committerSamuel Thibault <sthibault@debian.org>
Mon, 29 Oct 2018 20:36:01 +0000 (20:36 +0000)
commit9e3ddc42e48e8576c6f2343480af3a36847f4a85
treead544a7328f0b334c0ef9aa901e154f5e85d483e
parent8023bf9a4882c869f3828a6efecdf935f14b1e0e
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 git-tls_thread_leak.diff
sysdeps/mach/hurd/i386/tls.h