thread_exit() requires PROC_LOCK to be held, so lock it.

This commit is contained in:
John Baldwin 2002-07-11 22:13:33 +00:00
parent 7fa658d98b
commit 78dee2638a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99830

View File

@ -192,8 +192,9 @@ trap(struct trapframe *tf)
if (td->td_ucred != p->p_ucred)
cred_update_thread(td);
if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) {
PROC_LOCK(p);
mtx_lock_spin(&sched_lock);
thread_exit(); /* XXXKSE need proc lock? */
thread_exit();
/* NOTREACHED */
}
} else {