summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/isa_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/i386/isa/isa_machdep.c')
-rw-r--r--sys/arch/i386/isa/isa_machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c
index ad2b74f6796..d596af6d7a6 100644
--- a/sys/arch/i386/isa/isa_machdep.c
+++ b/sys/arch/i386/isa/isa_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa_machdep.c,v 1.73 2013/05/16 19:26:04 kettenis Exp $ */
+/* $OpenBSD: isa_machdep.c,v 1.74 2013/07/10 21:31:12 kettenis Exp $ */
/* $NetBSD: isa_machdep.c,v 1.22 1997/06/12 23:57:32 thorpej Exp $ */
/*-
@@ -501,6 +501,8 @@ isa_intr_establish(isa_chipset_tag_t ic, int irq, int type, int level,
flags = level & IPL_MPSAFE;
level &= ~IPL_MPSAFE;
+ KASSERT(level <= IPL_VM || level >= IPL_CLOCK || flags & IPL_MPSAFE);
+
/* no point in sleeping unless someone can free memory. */
ih = malloc(sizeof *ih, M_DEVBUF, cold ? M_NOWAIT : M_WAITOK);
if (ih == NULL) {