Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Sat, 2 Dec 2017 10:07:17 +0000 (10:07 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sat, 2 Dec 2017 10:07:17 +0000 (10:07 +0000)
commit18c2cba2e75d79f91a4618df1400256303b16758
treec9298e3b2d7bce84b26a958cbd3783cc0899c3bf
parentd6efebd713bafe7be5d0e8a6440ff38a811d5b54
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