summaryrefslogtreecommitdiff
path: root/sys/arch/hppa
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/hppa
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/hppa')
-rw-r--r--sys/arch/hppa/hppa/machdep.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c
index 515bc2bc5fd..fc39086d591 100644
--- a/sys/arch/hppa/hppa/machdep.c
+++ b/sys/arch/hppa/hppa/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.203 2011/06/26 22:39:59 deraadt Exp $ */
+/* $OpenBSD: machdep.c,v 1.204 2011/07/05 04:48:01 guenther Exp $ */
/*
* Copyright (c) 1999-2003 Michael Shalayeff
@@ -1187,15 +1187,15 @@ sendsig(sig_t catcher, int sig, int mask, u_long code, int type,
/* Save the FPU context first. */
fpu_proc_save(p);
- ksc.sc_onstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
+ ksc.sc_onstack = p->p_sigstk.ss_flags & SS_ONSTACK;
/*
* Allocate space for the signal handler context.
*/
- if ((psp->ps_flags & SAS_ALTSTACK) && !ksc.sc_onstack &&
+ if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !ksc.sc_onstack &&
(psp->ps_sigonstack & sigmask(sig))) {
- scp = (register_t)psp->ps_sigstk.ss_sp;
- psp->ps_sigstk.ss_flags |= SS_ONSTACK;
+ scp = (register_t)p->p_sigstk.ss_sp;
+ p->p_sigstk.ss_flags |= SS_ONSTACK;
} else
scp = (tf->tf_sp + 63) & ~63;
@@ -1319,9 +1319,9 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval)
return (EINVAL);
if (ksc.sc_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 = ksc.sc_mask &~ sigcantmask;
tf->tf_t1 = ksc.sc_regs[0]; /* r22 */