From: Samuel Thibault Date: Sat, 6 Jun 2020 23:55:54 +0000 (+0200) Subject: hurd: Fix hang in _hurd_raise_signal from pthread_kill X-Git-Tag: glibc-2.32~249 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fab94894d5c5b25d24010f823515fb53822d6623;p=thirdparty%2Fglibc.git hurd: Fix hang in _hurd_raise_signal from pthread_kill When ss is not NULL, it is assumed to be locked. * hurd/hurd-raise.c (_hurd_raise_signal): Unlock before returning an error if ss is not NULL. --- diff --git a/hurd/hurd-raise.c b/hurd/hurd-raise.c index af464377b61..865e498bf97 100644 --- a/hurd/hurd-raise.c +++ b/hurd/hurd-raise.c @@ -29,7 +29,11 @@ _hurd_raise_signal (struct hurd_sigstate *ss, int signo, const struct hurd_signal_detail *detail) { if (signo <= 0 || signo >= NSIG) - return EINVAL; + { + if (ss) + __spin_unlock (&ss->lock); + return EINVAL; + } if (ss == NULL) {