summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2020-11-08 20:37:25 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2020-11-08 20:37:25 +0000
commit74031521d567c6ba0101870b3799b63a6be4201c (patch)
tree3ef9403e70b4fa0f787d65c95afe5ddcfdae39e6 /sys/arch/sparc64
parentb6b37e2cad6e38e3e6bf47dabf031f65e846050a (diff)
In case of failure, call sigexit() from trapsignal instead of sensig().
Simplify MD code and reduce the amount of recursion into the signal code which helps when dealing with locks. ok cheloha@, deraadt@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/machdep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/machdep.c b/sys/arch/sparc64/sparc64/machdep.c
index aaf05e1e6dd..fb6cff2f1a2 100644
--- a/sys/arch/sparc64/sparc64/machdep.c
+++ b/sys/arch/sparc64/sparc64/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.198 2020/06/23 01:21:29 jmatthew Exp $ */
+/* $OpenBSD: machdep.c,v 1.199 2020/11/08 20:37:24 mpi Exp $ */
/* $NetBSD: machdep.c,v 1.108 2001/07/24 19:30:14 eeh Exp $ */
/*-
@@ -402,7 +402,7 @@ cpu_sysctl(int *name, u_int namelen, void *oldp, size_t *oldlenp, void *newp,
/*
* Send an interrupt to process.
*/
-void
+int
sendsig(sig_t catcher, int sig, sigset_t mask, const siginfo_t *ksip)
{
struct proc *p = curproc;
@@ -477,8 +477,7 @@ sendsig(sig_t catcher, int sig, sigset_t mask, const siginfo_t *ksip)
printf("sendsig: stack was trashed trying to send sig %d, "
"sending SIGILL\n", sig);
#endif
- sigexit(p, SIGILL);
- /* NOTREACHED */
+ return 1;
}
/*
@@ -490,6 +489,8 @@ sendsig(sig_t catcher, int sig, sigset_t mask, const siginfo_t *ksip)
tf->tf_pc = addr;
tf->tf_npc = addr + 4;
tf->tf_out[6] = newsp - STACK_OFFSET;
+
+ return 0;
}
/*