summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
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/sparc
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/sparc')
-rw-r--r--sys/arch/sparc/sparc/machdep.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 4cfb2f1a775..379b7d50c03 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.136 2011/06/26 22:40:00 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.137 2011/07/05 04:48:02 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -382,16 +382,16 @@ sendsig(catcher, sig, mask, code, type, val)
tf = p->p_md.md_tf;
oldsp = tf->tf_out[6];
- oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/*
* Compute new user stack addresses, subtract off
* one signal frame, and align.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
(psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct sigframe *)(psp->ps_sigstk.ss_sp +
- psp->ps_sigstk.ss_size);
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ fp = (struct sigframe *)(p->p_sigstk.ss_sp +
+ p->p_sigstk.ss_size);
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else
fp = (struct sigframe *)oldsp;
fp = (struct sigframe *)((int)(fp - 1) & ~7);
@@ -522,9 +522,9 @@ sys_sigreturn(p, v, retval)
tf->tf_out[0] = ksc.sc_o0;
tf->tf_out[6] = ksc.sc_sp;
if (ksc.sc_onstack & 1)
- 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 = ksc.sc_mask & ~sigcantmask;
return (EJUSTRETURN);
}