Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Sat, 17 Sep 2016 18:00:44 +0000 (18:00 +0000)
committerAurelien Jarno <aurel32@debian.org>
Sat, 17 Sep 2016 18:00:44 +0000 (18:00 +0000)
commitd79405cc0c8c6051e0578aaad531da72eec7156c
treee6d1a6d41401015a2a698006790177ff2e2f13f1
parentf6ba87e259cb06786f5f01a30f932b23b37b27dc
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