summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/machdep.c8
-rw-r--r--sys/i386/isa/npx.c2
-rw-r--r--sys/i386/isa/pcvt/pcvt_ext.c25
-rw-r--r--sys/i386/isa/spigot.c5
-rw-r--r--sys/i386/linux/linux_sysvec.c6
-rw-r--r--sys/i386/svr4/svr4_machdep.c1
6 files changed, 37 insertions, 10 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 0118473..5d9f8bd 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -510,8 +510,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;
}
@@ -592,7 +592,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;
@@ -671,8 +673,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;
}
@@ -740,7 +742,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/i386/isa/npx.c b/sys/i386/isa/npx.c
index 0dab6ae..87d274b 100644
--- a/sys/i386/isa/npx.c
+++ b/sys/i386/isa/npx.c
@@ -781,7 +781,9 @@ npx_intr(dummy)
*
* Treat them like a true async interrupt.
*/
+ PROC_LOCK(curproc);
psignal(curproc, SIGFPE);
+ PROC_UNLOCK(curproc);
}
mtx_unlock(&Giant);
}
diff --git a/sys/i386/isa/pcvt/pcvt_ext.c b/sys/i386/isa/pcvt/pcvt_ext.c
index 50ded4e..3f0e954 100644
--- a/sys/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/i386/isa/pcvt/pcvt_ext.c
@@ -2294,11 +2294,17 @@ vgapage(int new_screen)
/* Try resignaling uncooperative X-window servers */
if (vsp->smode.mode == VT_PROCESS) {
if (vsp->vt_status & VT_WAIT_REL) {
- if(vsp->smode.relsig)
+ if(vsp->smode.relsig) {
+ PROC_LOCK(vsp->proc);
psignal(vsp->proc, vsp->smode.relsig);
+ PROC_UNLOCK(vsp->proc);
+ }
} else if (vsp->vt_status & VT_WAIT_ACK) {
- if(vsp->smode.acqsig)
+ if(vsp->smode.acqsig) {
+ PROC_LOCK(vsp->proc);
psignal(vsp->proc, vsp->smode.acqsig);
+ PROC_UNLOCK(vsp->proc);
+ }
}
}
return EAGAIN;
@@ -2310,8 +2316,11 @@ vgapage(int new_screen)
{
/* we cannot switch immediately here */
vsp->vt_status |= VT_WAIT_REL;
- if(vsp->smode.relsig)
+ if(vsp->smode.relsig) {
+ PROC_LOCK(vsp->proc);
psignal(vsp->proc, vsp->smode.relsig);
+ PROC_UNLOCK(vsp->proc);
+ }
}
else
{
@@ -2341,8 +2350,11 @@ vgapage(int new_screen)
{
/* if _new_ vt is under process control... */
vsp->vt_status |= VT_WAIT_ACK;
- if(vsp->smode.acqsig)
+ if(vsp->smode.acqsig) {
+ PROC_LOCK(vsp->proc);
psignal(vsp->proc, vsp->smode.acqsig);
+ PROC_UNLOCK(vsp->proc);
+ }
}
else
{
@@ -2502,9 +2514,12 @@ usl_vt_ioctl(dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
*/
vsp->vt_status
|= VT_WAIT_ACK;
- if(vsp->smode.acqsig)
+ if(vsp->smode.acqsig) {
+ PROC_LOCK(vsp->proc);
psignal(vsp->proc,
vsp->smode.acqsig);
+ PROC_UNLOCK(vsp->proc);
+ }
}
else
{
diff --git a/sys/i386/isa/spigot.c b/sys/i386/isa/spigot.c
index 4c638d5..96272df 100644
--- a/sys/i386/isa/spigot.c
+++ b/sys/i386/isa/spigot.c
@@ -266,8 +266,11 @@ spigintr(int unit)
{
struct spigot_softc *ss = (struct spigot_softc *)&spigot_softc[unit];
- if(ss->p && ss->signal_num)
+ if(ss->p && ss->signal_num) {
+ PROC_LOCK(ss->p);
psignal(ss->p, ss->signal_num);
+ PROC_UNLOCK(ss->p);
+ }
}
static int
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index dc20e07..8050392 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -246,13 +246,13 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
SIGDELSET(p->p_sigignore, SIGILL);
SIGDELSET(p->p_sigcatch, SIGILL);
SIGDELSET(p->p_sigmask, SIGILL);
- PROC_UNLOCK(p);
#ifdef DEBUG
if (ldebug(sigreturn))
printf(LMSG("rt_sendsig: bad stack %p, oonstack=%x"),
fp, oonstack);
#endif
psignal(p, SIGILL);
+ PROC_UNLOCK(p);
return;
}
@@ -320,6 +320,7 @@ linux_rt_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
*/
+ PROC_LOCK(p);
sigexit(p, SIGILL);
/* NOTREACHED */
}
@@ -404,8 +405,8 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long 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;
}
@@ -454,6 +455,7 @@ linux_sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
*/
+ PROC_LOCK(p);
sigexit(p, SIGILL);
/* NOTREACHED */
}
diff --git a/sys/i386/svr4/svr4_machdep.c b/sys/i386/svr4/svr4_machdep.c
index 00bb45a..1541835 100644
--- a/sys/i386/svr4/svr4_machdep.c
+++ b/sys/i386/svr4/svr4_machdep.c
@@ -467,6 +467,7 @@ svr4_sendsig(catcher, sig, mask, code)
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
*/
+ PROC_LOCK(p);
sigexit(p, SIGILL);
/* NOTREACHED */
}
OpenPOWER on IntegriCloud