summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_sig.c
diff options
context:
space:
mode:
authortjr <tjr@FreeBSD.org>2003-03-09 01:40:55 +0000
committertjr <tjr@FreeBSD.org>2003-03-09 01:40:55 +0000
commit0b60094f80a8137660b368df0b80fb0179b92d04 (patch)
tree57c2940c1be148a3c23207779cad8bd858887f88 /sys/kern/kern_sig.c
parentf9db095419821df338531839b2723722d812b0ec (diff)
downloadFreeBSD-src-0b60094f80a8137660b368df0b80fb0179b92d04.zip
FreeBSD-src-0b60094f80a8137660b368df0b80fb0179b92d04.tar.gz
Hold the proc lock while accessing p_procsig in trapsignal().
Diffstat (limited to 'sys/kern/kern_sig.c')
-rw-r--r--sys/kern/kern_sig.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index 712f76a..9172098 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -1268,9 +1268,10 @@ trapsignal(p, sig, code)
register int sig;
u_long code;
{
- register struct sigacts *ps = p->p_sigacts;
+ register struct sigacts *ps;
PROC_LOCK(p);
+ ps = p->p_sigacts;
if ((p->p_flag & P_TRACED) == 0 && SIGISMEMBER(p->p_sigcatch, sig) &&
!SIGISMEMBER(p->p_sigmask, sig)) {
p->p_stats->p_ru.ru_nsignals++;
OpenPOWER on IntegriCloud