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.
This commit is contained in:
Samuel Thibault 2020-06-07 01:55:54 +02:00
parent 785ec62dbd
commit fab94894d5

View File

@ -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)
{