Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Fri, 25 Nov 2016 22:09:39 +0000 (22:09 +0000)
committerAurelien Jarno <aurel32@debian.org>
Fri, 25 Nov 2016 22:09:39 +0000 (22:09 +0000)
commit2b3f4bf4429e653a0a848d663ad3663aa5717e99
tree79d66a8587242c394899ced126832933ee3cb19d
parent2d7cce21afb6dcadc3f95628b06331bc0b99f6fc
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