diff options
author | jhb <jhb@FreeBSD.org> | 2001-06-18 19:23:43 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-06-18 19:23:43 +0000 |
commit | 1852c170852e451149bbb23f05c90310f707a739 (patch) | |
tree | d05ec573c58c3d02c90c09027860805c347febd5 /sys/kern | |
parent | 106b33e493cecca93d20edb82d49fb3250fa4290 (diff) | |
download | FreeBSD-src-1852c170852e451149bbb23f05c90310f707a739.zip FreeBSD-src-1852c170852e451149bbb23f05c90310f707a739.tar.gz |
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
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_sig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 1307b5c..5c43d06 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -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); |