Don't re-lock the sched lock if we didn't unlock it.

Original error by: David Xu <bsddiy@yahoo.com>
Fix by:	David Xu <bsddiy@yahoo.com>
Completely failed to spot it: Julian Elischer <julian@freebsd.org>
This commit is contained in:
julian 2002-08-23 07:23:44 +00:00
parent 907806e8e1
commit 90d0ff41ba

View File

@ -1666,9 +1666,9 @@ issignal(td)
psignal(p->p_pptr, SIGCHLD);
}
PROC_UNLOCK(p->p_pptr);
mtx_lock_spin(&sched_lock);
}
stop(p);
mtx_lock_spin(&sched_lock);
p->p_suspcount++;
td->td_state = TDS_SUSPENDED;
TAILQ_INSERT_TAIL(&p->p_suspended, td, td_runq);