From: Samuel Thibault Date: Mon, 10 Feb 2020 01:19:00 +0000 (+0000) Subject: htl: Make joining self return EDEADLK X-Git-Tag: glibc-2.32~695 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1905cf47bcfb53d9f7e640db83e43bbe32f9fa4a;p=thirdparty%2Fglibc.git htl: Make joining self return EDEADLK --- diff --git a/htl/pt-join.c b/htl/pt-join.c index 43878a3d527..ab77af52c1c 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -30,6 +30,9 @@ __pthread_join (pthread_t thread, void **status) struct __pthread *pthread; int err = 0; + if (thread == pthread_self ()) + return EDEADLK; + /* Lookup the thread structure for THREAD. */ pthread = __pthread_getid (thread); if (pthread == NULL)