summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_malloc.c')
-rw-r--r--sys/kern/kern_malloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c
index 986ec8f26d6..9660ca1d297 100644
--- a/sys/kern/kern_malloc.c
+++ b/sys/kern/kern_malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_malloc.c,v 1.85 2010/09/21 01:09:10 matthew Exp $ */
+/* $OpenBSD: kern_malloc.c,v 1.86 2010/09/26 21:03:56 tedu Exp $ */
/* $NetBSD: kern_malloc.c,v 1.15.4.2 1996/06/13 17:10:56 cgd Exp $ */
/*
@@ -191,6 +191,8 @@ malloc(unsigned long size, int type, int flags)
panic("malloc - bogus type");
#endif
+ KASSERT(flags & (M_WAITOK | M_NOWAIT));
+
if ((flags & M_NOWAIT) == 0)
assertwaitok();