Index: sys/kern/subr_pool.c =================================================================== RCS file: /cvsroot/src/sys/kern/subr_pool.c,v retrieving revision 1.214 diff -p -u -r1.214 subr_pool.c --- sys/kern/subr_pool.c 9 Nov 2017 19:34:17 -0000 1.214 +++ sys/kern/subr_pool.c 9 Nov 2017 20:43:46 -0000 @@ -751,6 +751,8 @@ pool_get(struct pool *pp, int flags) struct pool_item_header *ph; void *v; + KASSERT((flags & PR_NOWAIT) || (flags & PR_WAITOK)); + KASSERT(!(flags & PR_NOWAIT) || !(flags & PR_WAITOK)); KASSERTMSG((pp->pr_itemsperpage != 0), "%s: [%s] pr_itemsperpage is zero, " "pool not initialized?", __func__, pp->pr_wchan); @@ -2230,6 +2232,8 @@ pool_cache_get_paddr(pool_cache_t pc, in void *object; int s; + KASSERT((flags & PR_NOWAIT) || (flags & PR_WAITOK)); + KASSERT(!(flags & PR_NOWAIT) || !(flags & PR_WAITOK)); KASSERTMSG((!cpu_intr_p() && !cpu_softintr_p()) || (pc->pc_pool.pr_ipl != IPL_NONE || cold || panicstr != NULL), "%s: [%s] is IPL_NONE, but called from interrupt context",