Grab Giant around postsig() since sendsig() can call into the vm to
grow the stack and we already needed Giant for KTRACE.
This commit is contained in:
parent
aa5d2a75d8
commit
64acb05b1c
@ -1535,11 +1535,6 @@ postsig(sig)
|
||||
KASSERT(sig != 0, ("postsig"));
|
||||
|
||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||
#ifdef KTRACE
|
||||
PROC_UNLOCK(p);
|
||||
mtx_lock(&Giant);
|
||||
PROC_LOCK(p);
|
||||
#endif
|
||||
ps = p->p_sigacts;
|
||||
SIGDELSET(p->p_siglist, sig);
|
||||
action = ps->ps_sigact[_SIG_IDX(sig)];
|
||||
@ -1547,7 +1542,6 @@ postsig(sig)
|
||||
if (KTRPOINT(p, KTR_PSIG))
|
||||
ktrpsig(p->p_tracep, sig, action, p->p_flag & P_OLDMASK ?
|
||||
&p->p_oldsigmask : &p->p_sigmask, 0);
|
||||
mtx_unlock(&Giant);
|
||||
#endif
|
||||
_STOPEVENT(p, S_SIG, sig);
|
||||
|
||||
|
@ -67,9 +67,11 @@ userret(p, frame, oticks)
|
||||
{
|
||||
int sig;
|
||||
|
||||
mtx_lock(&Giant);
|
||||
PROC_LOCK(p);
|
||||
while ((sig = CURSIG(p)) != 0)
|
||||
postsig(sig);
|
||||
mtx_unlock(&Giant);
|
||||
|
||||
mtx_lock_spin(&sched_lock);
|
||||
PROC_UNLOCK_NOSWITCH(p);
|
||||
|
Loading…
x
Reference in New Issue
Block a user