diff options
author | jhb <jhb@FreeBSD.org> | 2001-09-06 22:20:41 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-09-06 22:20:41 +0000 |
commit | 054237d0bedad367db7ff79d400580da3e2f908f (patch) | |
tree | 81a6a9426eb4bd4704877e5d2c62645d4c91f07e /sys/amd64 | |
parent | fc76d31ce4a861706e4b49312b7a2f88a61bd53d (diff) | |
download | FreeBSD-src-054237d0bedad367db7ff79d400580da3e2f908f.zip FreeBSD-src-054237d0bedad367db7ff79d400580da3e2f908f.tar.gz |
Call sendsig() with the proc lock held and return with it held.
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/machdep.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 1df1f2d..e0dade2 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -294,7 +294,7 @@ osendsig(catcher, sig, mask, code) int oonstack; p = curproc; - PROC_LOCK(p); + PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; regs = p->p_frame; oonstack = sigonstack(regs->tf_esp); @@ -328,7 +328,6 @@ osendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); psignal(p, SIGILL); - PROC_UNLOCK(p); return; } @@ -422,6 +421,7 @@ osendsig(catcher, sig, mask, code) regs->tf_fs = _udatasel; load_gs(_udatasel); regs->tf_ss = _udatasel; + PROC_LOCK(p); } #endif @@ -440,11 +440,10 @@ sendsig(catcher, sig, mask, code) int oonstack; p = curproc; - PROC_LOCK(p); + PROC_LOCK_ASSERT(p, MA_OWNED); psp = p->p_sigacts; #ifdef COMPAT_43 if (SIGISMEMBER(psp->ps_osigset, sig)) { - PROC_UNLOCK(p); osendsig(catcher, sig, mask, code); return; } @@ -494,7 +493,6 @@ sendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); psignal(p, SIGILL); - PROC_UNLOCK(p); return; } @@ -574,6 +572,7 @@ sendsig(catcher, sig, mask, code) regs->tf_es = _udatasel; regs->tf_fs = _udatasel; regs->tf_ss = _udatasel; + PROC_LOCK(p); } /* |