diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-07 03:37:06 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-07 03:37:06 +0000 |
commit | 9cd254601baefc2dc9c953abe9747717374ff8b1 (patch) | |
tree | ac4298224e8af28e8b2f904a43a2925c21dfc798 /sys/pc98 | |
parent | ace71d59bf35fa6d911520ec855d0100773422a8 (diff) | |
download | FreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.zip FreeBSD-src-9cd254601baefc2dc9c953abe9747717374ff8b1.tar.gz |
Grab the process lock while calling psignal and before calling psignal.
Diffstat (limited to 'sys/pc98')
-rw-r--r-- | sys/pc98/i386/machdep.c | 8 | ||||
-rw-r--r-- | sys/pc98/pc98/machdep.c | 8 | ||||
-rw-r--r-- | sys/pc98/pc98/npx.c | 2 | ||||
-rw-r--r-- | sys/pc98/pc98/syscons.c | 4 |
4 files changed, 18 insertions, 4 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index ab2e253..ffbfd04 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -523,8 +523,8 @@ osendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigignore, SIGILL); SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); - PROC_UNLOCK(p); psignal(p, SIGILL); + PROC_UNLOCK(p); return; } @@ -605,7 +605,9 @@ osendsig(catcher, sig, mask, code) * Something is wrong with the stack pointer. * ...Kill the process. */ + PROC_LOCK(p); sigexit(p, SIGILL); + /* NOTREACHED */ } regs->tf_esp = (int)fp; @@ -684,8 +686,8 @@ sendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigignore, SIGILL); SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); - PROC_UNLOCK(p); psignal(p, SIGILL); + PROC_UNLOCK(p); return; } @@ -753,7 +755,9 @@ sendsig(catcher, sig, mask, code) * Something is wrong with the stack pointer. * ...Kill the process. */ + PROC_LOCK(p); sigexit(p, SIGILL); + /* NOTREACHED */ } regs->tf_esp = (int)sfp; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index ab2e253..ffbfd04 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -523,8 +523,8 @@ osendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigignore, SIGILL); SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); - PROC_UNLOCK(p); psignal(p, SIGILL); + PROC_UNLOCK(p); return; } @@ -605,7 +605,9 @@ osendsig(catcher, sig, mask, code) * Something is wrong with the stack pointer. * ...Kill the process. */ + PROC_LOCK(p); sigexit(p, SIGILL); + /* NOTREACHED */ } regs->tf_esp = (int)fp; @@ -684,8 +686,8 @@ sendsig(catcher, sig, mask, code) SIGDELSET(p->p_sigignore, SIGILL); SIGDELSET(p->p_sigcatch, SIGILL); SIGDELSET(p->p_sigmask, SIGILL); - PROC_UNLOCK(p); psignal(p, SIGILL); + PROC_UNLOCK(p); return; } @@ -753,7 +755,9 @@ sendsig(catcher, sig, mask, code) * Something is wrong with the stack pointer. * ...Kill the process. */ + PROC_LOCK(p); sigexit(p, SIGILL); + /* NOTREACHED */ } regs->tf_esp = (int)sfp; diff --git a/sys/pc98/pc98/npx.c b/sys/pc98/pc98/npx.c index 75176b3..e31e308 100644 --- a/sys/pc98/pc98/npx.c +++ b/sys/pc98/pc98/npx.c @@ -835,7 +835,9 @@ npx_intr(dummy) * * Treat them like a true async interrupt. */ + PROC_LOCK(p); psignal(curproc, SIGFPE); + PROC_UNLOCK(p); } mtx_unlock(&Giant); } diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index adb0e7c..b157f4a 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -2314,7 +2314,9 @@ signal_vt_rel(scr_stat *scp) if (scp->smode.mode != VT_PROCESS) return FALSE; scp->status |= SWITCH_WAIT_REL; + PROC_LOCK(scp->proc); psignal(scp->proc, scp->smode.relsig); + PROC_UNLOCK(scp->proc); DPRINTF(5, ("sending relsig to %d\n", scp->pid)); return TRUE; } @@ -2327,7 +2329,9 @@ signal_vt_acq(scr_stat *scp) if (scp->sc->unit == sc_console_unit) cons_unavail = TRUE; scp->status |= SWITCH_WAIT_ACQ; + PROC_LOCK(scp->proc); psignal(scp->proc, scp->smode.acqsig); + PROC_UNLOCK(scp->proc); DPRINTF(5, ("sending acqsig to %d\n", scp->pid)); return TRUE; } |