Index: sys/kern/kern_mutex.c =================================================================== --- sys/kern/kern_mutex.c +++ sys/kern/kern_mutex.c @@ -172,10 +172,14 @@ static void _mtx_lock_indefinite_check(struct mtx *, struct lock_delay_arg *); -void +static void assert_mtx(const struct lock_object *lock, int what) { + if (what & LA_LOCKED) { + what &= ~LA_LOCKED; + what |= LA_XLOCKED; + } mtx_assert((const struct mtx *)lock, what); }