Hold the proc lock for curproc around sigonstack().
This commit is contained in:
parent
2d3db0b823
commit
ee6c1d2ed2
@ -1132,11 +1132,11 @@ osendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
|
|||||||
|
|
||||||
td = curthread;
|
td = curthread;
|
||||||
p = td->td_proc;
|
p = td->td_proc;
|
||||||
|
PROC_LOCK_ASSERT(p, MA_OWNED);
|
||||||
frame = td->td_frame;
|
frame = td->td_frame;
|
||||||
oonstack = sigonstack(alpha_pal_rdusp());
|
oonstack = sigonstack(alpha_pal_rdusp());
|
||||||
fsize = sizeof ksi;
|
fsize = sizeof ksi;
|
||||||
rndfsize = ((fsize + 15) / 16) * 16;
|
rndfsize = ((fsize + 15) / 16) * 16;
|
||||||
PROC_LOCK_ASSERT(p, MA_OWNED);
|
|
||||||
psp = p->p_sigacts;
|
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_regs[FRAME_SP] = alpha_pal_rdusp();
|
||||||
|
|
||||||
mcp->mc_format = _MC_REV0_TRAPFRAME;
|
mcp->mc_format = _MC_REV0_TRAPFRAME;
|
||||||
|
PROC_LOCK(curthread->td_proc);
|
||||||
mcp->mc_onstack = sigonstack(alpha_pal_rdusp()) ? 1 : 0;
|
mcp->mc_onstack = sigonstack(alpha_pal_rdusp()) ? 1 : 0;
|
||||||
|
PROC_UNLOCK(curthread->td_proc);
|
||||||
get_fpcontext(td, mcp);
|
get_fpcontext(td, mcp);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@ -2365,7 +2365,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
|
|||||||
|
|
||||||
tp = td->td_frame;
|
tp = td->td_frame;
|
||||||
|
|
||||||
|
PROC_LOCK(curthread->td_proc);
|
||||||
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
||||||
|
PROC_UNLOCK(curthread->td_proc);
|
||||||
mcp->mc_gs = td->td_pcb->pcb_gs;
|
mcp->mc_gs = td->td_pcb->pcb_gs;
|
||||||
mcp->mc_fs = tp->tf_fs;
|
mcp->mc_fs = tp->tf_fs;
|
||||||
mcp->mc_es = tp->tf_es;
|
mcp->mc_es = tp->tf_es;
|
||||||
|
@ -2365,7 +2365,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
|
|||||||
|
|
||||||
tp = td->td_frame;
|
tp = td->td_frame;
|
||||||
|
|
||||||
|
PROC_LOCK(curthread->td_proc);
|
||||||
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
||||||
|
PROC_UNLOCK(curthread->td_proc);
|
||||||
mcp->mc_gs = td->td_pcb->pcb_gs;
|
mcp->mc_gs = td->td_pcb->pcb_gs;
|
||||||
mcp->mc_fs = tp->tf_fs;
|
mcp->mc_fs = tp->tf_fs;
|
||||||
mcp->mc_es = tp->tf_es;
|
mcp->mc_es = tp->tf_es;
|
||||||
|
@ -2434,7 +2434,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
|
|||||||
|
|
||||||
tp = td->td_frame;
|
tp = td->td_frame;
|
||||||
|
|
||||||
|
PROC_LOCK(curthread->td_proc);
|
||||||
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
||||||
|
PROC_UNLOCK(curthread->td_proc);
|
||||||
mcp->mc_gs = td->td_pcb->pcb_gs;
|
mcp->mc_gs = td->td_pcb->pcb_gs;
|
||||||
mcp->mc_fs = tp->tf_fs;
|
mcp->mc_fs = tp->tf_fs;
|
||||||
mcp->mc_es = tp->tf_es;
|
mcp->mc_es = tp->tf_es;
|
||||||
|
@ -2434,7 +2434,9 @@ get_mcontext(struct thread *td, mcontext_t *mcp)
|
|||||||
|
|
||||||
tp = td->td_frame;
|
tp = td->td_frame;
|
||||||
|
|
||||||
|
PROC_LOCK(curthread->td_proc);
|
||||||
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
mcp->mc_onstack = sigonstack(tp->tf_esp);
|
||||||
|
PROC_UNLOCK(curthread->td_proc);
|
||||||
mcp->mc_gs = td->td_pcb->pcb_gs;
|
mcp->mc_gs = td->td_pcb->pcb_gs;
|
||||||
mcp->mc_fs = tp->tf_fs;
|
mcp->mc_fs = tp->tf_fs;
|
||||||
mcp->mc_es = tp->tf_es;
|
mcp->mc_es = tp->tf_es;
|
||||||
|
Loading…
Reference in New Issue
Block a user