diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index 66eb5d6bf958..3d7f6f490a63 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -424,8 +424,7 @@ msleep(ident, mtx, priority, wmesg, timo) mtx_enter(&sched_lock, MTX_SPIN); if (mtx != NULL) { - KASSERT(mtx->mtx_recurse == 0, - ("sleeping on recursed mutex %s", mtx->mtx_description)); + mtx_assert(mtx, MA_OWNED | MA_NOTRECURSED); WITNESS_SAVE(mtx, mtx); mtx_exit(mtx, MTX_DEF | MTX_NOSWITCH); if (priority & PDROP)