summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-18 21:44:57 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2011-04-18 21:44:57 +0000
commitbce64c2a24fb4484b18813bef367dcc71e8a0dd0 (patch)
treedfc7f71507d6c603255802772ca128609460ca08 /sys/arch/sparc
parentfd1b35e57ce1fdce5ec1dc979ff36b7649cab0c5 (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/sparc')
-rw-r--r--sys/arch/sparc/sparc/machdep.c16
-rw-r--r--sys/arch/sparc/sparc/svr4_machdep.c15
2 files changed, 16 insertions, 15 deletions
diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c
index 2e1cda76f1d..3cc31de8fec 100644
--- a/sys/arch/sparc/sparc/machdep.c
+++ b/sys/arch/sparc/sparc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.133 2011/04/15 04:52:40 guenther Exp $ */
+/* $OpenBSD: machdep.c,v 1.134 2011/04/18 21:44:55 guenther Exp $ */
/* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */
/*
@@ -395,16 +395,16 @@ sendsig(catcher, sig, mask, code, type, val)
tf = p->p_md.md_tf;
oldsp = tf->tf_out[6];
- oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
/*
* Compute new user stack addresses, subtract off
* one signal frame, and align.
*/
- if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
+ if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
(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 *)oldsp;
fp = (struct sigframe *)((int)(fp - 1) & ~7);
@@ -535,9 +535,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_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 = ksc.sc_mask & ~sigcantmask;
return (EJUSTRETURN);
}
diff --git a/sys/arch/sparc/sparc/svr4_machdep.c b/sys/arch/sparc/sparc/svr4_machdep.c
index a2dde35c7fd..e1514f427fc 100644
--- a/sys/arch/sparc/sparc/svr4_machdep.c
+++ b/sys/arch/sparc/sparc/svr4_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: svr4_machdep.c,v 1.16 2011/04/16 19:09:41 miod Exp $ */
+/* $OpenBSD: svr4_machdep.c,v 1.17 2011/04/18 21:44:55 guenther Exp $ */
/* $NetBSD: svr4_machdep.c,v 1.24 1997/07/29 10:04:45 fair Exp $ */
/*
@@ -216,10 +216,11 @@ svr4_setcontext(p, uc)
struct proc *p;
struct svr4_ucontext *uc;
{
+ struct sigacts *psp = p->p_sigacts;
register struct trapframe *tf;
svr4_greg_t *r = uc->uc_mcontext.greg;
struct svr4_sigaltstack *s = &uc->uc_stack;
- struct sigaltstack *sf = &p->p_sigstk;
+ struct sigaltstack *sf = &psp->ps_sigstk;
int mask;
#ifdef FPU_CONTEXT
svr4_fregset_t *f = &uc->uc_mcontext.freg;
@@ -461,16 +462,16 @@ svr4_sendsig(catcher, sig, mask, code, type, val)
tf = (struct trapframe *)p->p_md.md_tf;
oldsp = tf->tf_out[6];
- oonstack = p->p_sigstk.ss_flags & SS_ONSTACK;
+ oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK;
/*
* Allocate space for the signal handler context.
*/
- if ((p->p_sigstk.ss_flags & SS_DISABLE) == 0 && !oonstack &&
+ if ((psp->ps_flags & SAS_ALTSTACK) && !oonstack &&
(psp->ps_sigonstack & sigmask(sig))) {
- fp = (struct svr4_sigframe *)(p->p_sigstk.ss_sp +
- p->p_sigstk.ss_size);
- p->p_sigstk.ss_flags |= SS_ONSTACK;
+ fp = (struct svr4_sigframe *)(psp->ps_sigstk.ss_sp +
+ psp->ps_sigstk.ss_size);
+ psp->ps_sigstk.ss_flags |= SS_ONSTACK;
} else {
fp = (struct svr4_sigframe *)oldsp;
}