Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Tue, 21 Nov 2017 23:14:20 +0000 (23:14 +0000)
committerAurelien Jarno <aurel32@debian.org>
Tue, 21 Nov 2017 23:14:20 +0000 (23:14 +0000)
commit9627a4d9c1708b6cb15254c92a5a2474a907f245
treed0665c2f9aa67115ad74d0d33ca5679790e40ec3
parentfae033085e5797c2d0500cc7eed71e1ef7a1bf2e
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