Hurd: fix port leak in TLS
authorRichard Braun <rbraun@sceen.net>
Wed, 29 Nov 2017 03:00:21 +0000 (03:00 +0000)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 29 Nov 2017 03:00:21 +0000 (03:00 +0000)
commit2b3880964437703eae7ce71f443d0274770c78a8
tree4762cffbaa1e28e41a8e666e8c52ab0c1afcea48
parent0c5daf3d43055cc46d5d6cc4c91fd96245d32e90
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