1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

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:
John Baldwin 2001-07-03 05:27:53 +00:00
parent aa5d2a75d8
commit 64acb05b1c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=79125
2 changed files with 2 additions and 6 deletions

View File

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

View File

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