Hold the proc lock for curproc around sigonstack().

This commit is contained in:
jhb 2003-04-18 20:09:04 +00:00
parent 9abedb6965
commit 5bc80dc230
5 changed files with 11 additions and 1 deletions

View File

@ -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);
}

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;