mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Drop the sigacts mutex around calls to stopevent() to avoid sleeping
holding the mutex. Because the sigacts pointer can't change while the process is "live" (proc locking (x)), we know our pointer is still valid. In communication with: truckman Reviewed by: jhb
This commit is contained in:
parent
ed283fb506
commit
047aa39b25
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=124267
@ -2080,7 +2080,11 @@ issignal(td)
|
||||
return (0);
|
||||
sig = sig_ffs(&sigpending);
|
||||
|
||||
_STOPEVENT(p, S_SIG, sig);
|
||||
if (p->p_stops & S_SIG) {
|
||||
mtx_unlock(&ps->ps_mtx);
|
||||
stopevent(p, S_SIG, sig);
|
||||
mtx_lock(&ps->ps_mtx);
|
||||
}
|
||||
|
||||
/*
|
||||
* We should see pending but ignored signals
|
||||
@ -2296,7 +2300,11 @@ postsig(sig)
|
||||
ktrpsig(sig, action, td->td_pflags & TDP_OLDMASK ?
|
||||
&td->td_oldsigmask : &td->td_sigmask, 0);
|
||||
#endif
|
||||
_STOPEVENT(p, S_SIG, sig);
|
||||
if (p->p_stops & S_SIG) {
|
||||
mtx_unlock(&ps->ps_mtx);
|
||||
stopevent(p, S_SIG, sig);
|
||||
mtx_lock(&ps->ps_mtx);
|
||||
}
|
||||
|
||||
if (!(td->td_flags & TDF_SA && td->td_mailbox) &&
|
||||
action == SIG_DFL) {
|
||||
|
Loading…
Reference in New Issue
Block a user