diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-18 21:44:57 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2011-04-18 21:44:57 +0000 |
commit | bce64c2a24fb4484b18813bef367dcc71e8a0dd0 (patch) | |
tree | dfc7f71507d6c603255802772ca128609460ca08 /sys/arch/macppc | |
parent | fd1b35e57ce1fdce5ec1dc979ff36b7649cab0c5 (diff) |
Revert the sigacts diff: NFS can apparently retain pointers to processes
until they're zombies and then send them signals (for intr mounts). Until
that is untangled, the sigacts change is unsafe. sthen@ was the victim
for this one
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/machdep.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c index 78da19010bc..cfcd9e317de 100644 --- a/sys/arch/macppc/macppc/machdep.c +++ b/sys/arch/macppc/macppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.125 2011/04/15 20:52:57 deraadt Exp $ */ +/* $OpenBSD: machdep.c,v 1.126 2011/04/18 21:44:55 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -576,17 +576,17 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type, frame.sf_signum = sig; tf = trapframe(p); - oldonstack = p->p_sigstk.ss_flags & SS_ONSTACK; + oldonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; /* * Allocate stack space for signal handler. */ - if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 + if ((psp->ps_flags & SAS_ALTSTACK) && !oldonstack && (psp->ps_sigonstack & sigmask(sig))) { - fp = (struct sigframe *)(p->p_sigstk.ss_sp - + p->p_sigstk.ss_size); - p->p_sigstk.ss_flags |= SS_ONSTACK; + fp = (struct sigframe *)(psp->ps_sigstk.ss_sp + + psp->ps_sigstk.ss_size); + psp->ps_sigstk.ss_flags |= SS_ONSTACK; } else fp = (struct sigframe *)tf->fixreg[1]; @@ -642,9 +642,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval) return EINVAL; bcopy(&sc.sc_frame, tf, sizeof *tf); if (sc.sc_onstack & 1) - p->p_sigstk.ss_flags |= SS_ONSTACK; + p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK; else - p->p_sigstk.ss_flags &= ~SS_ONSTACK; + p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK; p->p_sigmask = sc.sc_mask & ~sigcantmask; return EJUSTRETURN; } |