Index: sys/kern/subr_kmem.c =================================================================== RCS file: /cvsroot/src/sys/kern/subr_kmem.c,v retrieving revision 1.64 diff -p -u -r1.64 subr_kmem.c --- sys/kern/subr_kmem.c 7 Nov 2017 18:35:57 -0000 1.64 +++ sys/kern/subr_kmem.c 9 Nov 2017 22:05:39 -0000 @@ -260,6 +260,9 @@ kmem_intr_alloc(size_t requested_size, k KASSERT(requested_size > 0); + KASSERT((kmflags & KM_SLEEP) || (kmflags & KM_NOSLEEP)); + KASSERT(!(kmflags & KM_SLEEP) || !(kmflags & KM_NOSLEEP)); + #ifdef KMEM_GUARD if (kmem_guard_enabled) { return kmem_guard_alloc(&kmem_guard, requested_size,