summaryrefslogtreecommitdiff
path: root/sys/arch/m88k
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-05 04:48:03 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-07-05 04:48:03 +0000
commit0e36778a06f5746ef60cadc41c445d6f5b6cc647 (patch)
tree28f4fa5e7600b312b1d6084db8548e11c7f9d783 /sys/arch/m88k
parenta7942e7ec8d68c52b4e9833fffb6c7810fde7f15 (diff)
Recommit the reverted sigacts change now that the NFS use-after-free
problem has been tracked down. This fixes the sharing of the signal handling state: shared bits go in sigacts, per-rthread bits goes in struct proc. ok deraadt@
Diffstat (limited to 'sys/arch/m88k')
-rw-r--r--sys/arch/m88k/m88k/sig_machdep.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c
index 49954336de8..4e3e88b2f91 100644
--- a/sys/arch/m88k/m88k/sig_machdep.c
+++ b/sys/arch/m88k/m88k/sig_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sig_machdep.c,v 1.12 2011/04/18 21:44:55 guenther Exp $ */
+/* $OpenBSD: sig_machdep.c,v 1.13 2011/07/05 04:48:01 guenther Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -95,7 +95,7 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type,
vaddr_t addr;
tf = p->p_md.md_tf;
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/*
* Allocate and validate space for the signal handler
* context. Note that if the stack is in data space, the
@@ -104,12 +104,12 @@ sendsig(sig_t catcher, int sig, int mask, unsigned long code, int type,
* the space with a `brk'.
*/
fsize = sizeof(struct sigframe);
- if ((psp->ps_flags & SAS_ALTSTACK) &&
- (psp->ps_sigstk.ss_flags & SS_ONSTACK) == 0 &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 &&
+ (p->p_sigstk.ss_flags & SS_ONSTACK) == 0 &&
(psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct sigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size - fsize);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ fp = (struct sigframe *)(p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size - fsize);
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else
fp = (struct sigframe *)(tf->tf_r[31] - fsize);
@@ -222,9 +222,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval)
* Restore the user supplied information
*/
if (scp->sc_onstack & SS_ONSTACK)
- p->p_sigacts->ps_sigstk.ss_flags |= SS_ONSTACK;
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
else
- p->p_sigacts->ps_sigstk.ss_flags &= ~SS_ONSTACK;
+ p->p_sigstk.ss_flags &= ~SS_ONSTACK;
p->p_sigmask = scp->sc_mask & ~sigcantmask;
/*