summaryrefslogtreecommitdiff
path: root/sys/arch/hp300
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2008-05-01 15:30:31 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2008-05-01 15:30:31 +0000
commit4867f442be3930ae66b41d0be9f12cac218be465 (patch)
treecd9eb7114c963fb026b8627c4db378f50c3ba05f /sys/arch/hp300
parent424bcc2b3d19dd572f3ddb7504193ed8b617dee4 (diff)
Sync hpux_sendsig() behaviour with native sendsig(): let malloc fail and
sigexit the process in this case.
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r--sys/arch/hp300/hp300/hpux_machdep.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/hp300/hp300/hpux_machdep.c b/sys/arch/hp300/hp300/hpux_machdep.c
index e180c0a2789..74eec250d6c 100644
--- a/sys/arch/hp300/hp300/hpux_machdep.c
+++ b/sys/arch/hp300/hp300/hpux_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_machdep.c,v 1.21 2007/11/02 19:18:54 martin Exp $ */
+/* $OpenBSD: hpux_machdep.c,v 1.22 2008/05/01 15:30:29 miod Exp $ */
/* $NetBSD: hpux_machdep.c,v 1.19 1998/02/16 20:58:30 thorpej Exp $ */
/*
@@ -419,7 +419,13 @@ hpux_sendsig(catcher, sig, mask, code, type, val)
p->p_pid, sig, &oonstack, fp, &fp->hsf_sc, ft);
#endif
- kfp = (struct hpuxsigframe *)malloc((u_long)fsize, M_TEMP, M_WAITOK);
+ kfp = (struct hpuxsigframe *)malloc((u_long)fsize, M_TEMP,
+ M_WAITOK | M_CANFAIL);
+ if (kfp == NULL) {
+ /* Better halt the process in its track than panicing */
+ sigexit(p, SIGILL);
+ /* NOTREACHED */
+ }
/*
* Build the argument list for the signal handler.