diff --git a/sys/kern/subr_autoconf.c b/sys/kern/subr_autoconf.c index 121a18242abe..6415a1e7f4f6 100644 --- a/sys/kern/subr_autoconf.c +++ b/sys/kern/subr_autoconf.c @@ -1960,7 +1960,12 @@ config_detach_exit(device_t dev) { mutex_enter(&config_misc_lock); - KASSERT(dev->dv_detaching == curlwp); + KASSERTMSG(dev->dv_detaching == curlwp, + "lwp %ld [%s] @ %p detaching", + (long)dev->dv_detaching->l_lid, + (dev->dv_detaching->l_name ? dev->dv_detaching->l_name + : dev->dv_detaching->l_proc->p_comm), + dev->dv_detaching); dev->dv_detaching = NULL; cv_broadcast(&config_misc_cv); mutex_exit(&config_misc_lock); @@ -2173,7 +2178,12 @@ config_detach_commit(device_t dev) { mutex_enter(&config_misc_lock); - KASSERT(dev->dv_detaching == curlwp); + KASSERTMSG(dev->dv_detaching == curlwp, + "lwp %ld [%s] @ %p detaching", + (long)dev->dv_detaching->l_lid, + (dev->dv_detaching->l_name ? dev->dv_detaching->l_name + : dev->dv_detaching->l_proc->p_comm), + dev->dv_detaching); dev->dv_detached = true; cv_broadcast(&config_misc_cv); mutex_exit(&config_misc_lock);