summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-04-18 20:09:04 +0000
committerjhb <jhb@FreeBSD.org>2003-04-18 20:09:04 +0000
commit5bc80dc230e9205f0634c3ad9e2538984234d26a (patch)
tree760223efaf6c7bd5f6cfc5739f6477c0669a96df
parent9abedb69656d2f3214f026dc987e697bc7a6047d (diff)
downloadFreeBSD-src-5bc80dc230e9205f0634c3ad9e2538984234d26a.zip
FreeBSD-src-5bc80dc230e9205f0634c3ad9e2538984234d26a.tar.gz
Hold the proc lock for curproc around sigonstack().
-rw-r--r--sys/alpha/alpha/machdep.c4
-rw-r--r--sys/amd64/amd64/machdep.c2
-rw-r--r--sys/i386/i386/machdep.c2
-rw-r--r--sys/pc98/i386/machdep.c2
-rw-r--r--sys/pc98/pc98/machdep.c2
5 files changed, 11 insertions, 1 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c
index 50627d9..c7e8c8c 100644
--- a/sys/alpha/alpha/machdep.c
+++ b/sys/alpha/alpha/machdep.c
@@ -1132,11 +1132,11 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
td = curthread;
p = td->td_proc;
+ PROC_LOCK_ASSERT(p, MA_OWNED);
frame = td->td_frame;
oonstack = sigonstack(alpha_pal_rdusp());
fsize = sizeof ksi;
rndfsize = ((fsize + 15) / 16) * 16;
- PROC_LOCK_ASSERT(p, MA_OWNED);
psp = p->p_sigacts;
/*
@@ -1993,7 +1993,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
mcp->mc_regs[FRAME_SP] = alpha_pal_rdusp();
mcp->mc_format = _MC_REV0_TRAPFRAME;
+ PROC_LOCK(curthread->td_proc);
mcp->mc_onstack = sigonstack(alpha_pal_rdusp()) ? 1 : 0;
+ PROC_UNLOCK(curthread->td_proc);
get_fpcontext(td, mcp);
return (0);
}
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index baab5cb..d2dba4f 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -2365,7 +2365,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
tp = td->td_frame;
+ PROC_LOCK(curthread->td_proc);
mcp->mc_onstack = sigonstack(tp->tf_esp);
+ PROC_UNLOCK(curthread->td_proc);
mcp->mc_gs = td->td_pcb->pcb_gs;
mcp->mc_fs = tp->tf_fs;
mcp->mc_es = tp->tf_es;
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index baab5cb..d2dba4f 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -2365,7 +2365,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
tp = td->td_frame;
+ PROC_LOCK(curthread->td_proc);
mcp->mc_onstack = sigonstack(tp->tf_esp);
+ PROC_UNLOCK(curthread->td_proc);
mcp->mc_gs = td->td_pcb->pcb_gs;
mcp->mc_fs = tp->tf_fs;
mcp->mc_es = tp->tf_es;
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index afeddec..707b8fc 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -2434,7 +2434,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
tp = td->td_frame;
+ PROC_LOCK(curthread->td_proc);
mcp->mc_onstack = sigonstack(tp->tf_esp);
+ PROC_UNLOCK(curthread->td_proc);
mcp->mc_gs = td->td_pcb->pcb_gs;
mcp->mc_fs = tp->tf_fs;
mcp->mc_es = tp->tf_es;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index afeddec..707b8fc 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -2434,7 +2434,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
tp = td->td_frame;
+ PROC_LOCK(curthread->td_proc);
mcp->mc_onstack = sigonstack(tp->tf_esp);
+ PROC_UNLOCK(curthread->td_proc);
mcp->mc_gs = td->td_pcb->pcb_gs;
mcp->mc_fs = tp->tf_fs;
mcp->mc_es = tp->tf_es;
OpenPOWER on IntegriCloud