Only unlock process if a thread is found.
This commit is contained in:
parent
7dc246bc0f
commit
32c63db519
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=215336
@ -1592,12 +1592,12 @@ umtxq_sleep_pi(struct umtx_q *uq, struct umtx_pi *pi,
|
|||||||
/* XXX Only look up thread in current process. */
|
/* XXX Only look up thread in current process. */
|
||||||
td1 = tdfind(owner, curproc->p_pid);
|
td1 = tdfind(owner, curproc->p_pid);
|
||||||
mtx_lock_spin(&umtx_lock);
|
mtx_lock_spin(&umtx_lock);
|
||||||
if (td1 != NULL && pi->pi_owner == NULL) {
|
if (td1 != NULL) {
|
||||||
uq1 = td1->td_umtxq;
|
if (pi->pi_owner == NULL)
|
||||||
umtx_pi_setowner(pi, td1);
|
umtx_pi_setowner(pi, td1);
|
||||||
}
|
|
||||||
PROC_UNLOCK(td1->td_proc);
|
PROC_UNLOCK(td1->td_proc);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) {
|
TAILQ_FOREACH(uq1, &pi->pi_blocked, uq_lockq) {
|
||||||
pri = UPRI(uq1->uq_thread);
|
pri = UPRI(uq1->uq_thread);
|
||||||
|
Loading…
Reference in New Issue
Block a user