summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-09-16 09:06:42 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-09-16 09:06:42 +0000
commit2709813235b2561527ed3c1f5e8b6fe117ddc89c (patch)
tree8c2916412e20a87d09245db1105c23a3f4362042 /sys/arch
parent35cf7201f237e00337a0d7b1a37dd6124697188a (diff)
When copyout() of the signal frame fails, sigexit() the process instead of
doing this by an hand-delivered SIGILL.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/mips64/mips64/sendsig.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/arch/mips64/mips64/sendsig.c b/sys/arch/mips64/mips64/sendsig.c
index 7e7a58b02a1..4c1e0dec5e9 100644
--- a/sys/arch/mips64/mips64/sendsig.c
+++ b/sys/arch/mips64/mips64/sendsig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sendsig.c,v 1.3 2004/08/10 20:15:47 deraadt Exp $ */
+/* $OpenBSD: sendsig.c,v 1.4 2004/09/16 09:06:41 miod Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -131,8 +131,8 @@ sendsig(catcher, sig, mask, code, type, val)
psp->ps_sigstk.ss_flags |= SA_ONSTACK;
} else
fp = (struct sigframe *)(regs->sp - fsize);
- if ((long)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
- (void)uvm_grow(p, (long)fp);
+ if ((vaddr_t)fp <= USRSTACK - ctob(p->p_vmspace->vm_ssize))
+ (void)uvm_grow(p, (vaddr_t)fp);
#ifdef DEBUG
if ((sigdebug & SDB_FOLLOW) ||
((sigdebug & SDB_KSTACK) && (p->p_pid == sigpid)))
@@ -179,13 +179,8 @@ bail:
* Process has trashed its stack; give it an illegal
* instruction to halt it in its tracks.
*/
- SIGACTION(p, SIGILL) = SIG_DFL;
- sig = sigmask(SIGILL);
- p->p_sigignore &= ~sig;
- p->p_sigcatch &= ~sig;
- p->p_sigmask &= ~sig;
- psignal(p, SIGILL);
- return;
+ sigexit(p, SIGILL);
+ /* NOTREACHED */
}
/*
* Build the argument list for the signal handler.