Lock Giant in postsig() for the KTRACE case as ktrpsig() needs Giant when
it writes out to the trace file. Reported by: peter, gallatin, and others
This commit is contained in:
parent
106b33e493
commit
1852c17085
@ -1536,6 +1536,9 @@ postsig(sig)
|
||||
|
||||
KASSERT(sig != 0, ("postsig"));
|
||||
|
||||
#ifdef KTRACE
|
||||
mtx_lock(&Giant);
|
||||
#endif
|
||||
PROC_LOCK(p);
|
||||
ps = p->p_sigacts;
|
||||
SIGDELSET(p->p_siglist, sig);
|
||||
@ -1544,6 +1547,7 @@ 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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user