summaryrefslogtreecommitdiff
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 6fcea781fb50..49e8307cf4c3 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1040,6 +1040,8 @@ pgsignal(pgrp, sig, checkctty)
* Send a signal caused by a trap to the current process.
* If it will be caught immediately, deliver it with correct code.
* Otherwise, post it normally.
+ *
+ * MPSAFE
*/
void
trapsignal(p, sig, code)
@@ -1049,6 +1051,7 @@ trapsignal(p, sig, code)
{
register struct sigacts *ps = p->p_sigacts;
+ mtx_lock(&Giant);
PROC_LOCK(p);
if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) &&
!SIGISMEMBER(p->p_sigmask, sig)) {
@@ -1081,6 +1084,7 @@ trapsignal(p, sig, code)
psignal(p, sig);
}
PROC_UNLOCK(p);
+ mtx_unlock(&Giant);
}
/*