Index: sys/kern/subr_witness.c =================================================================== --- sys/kern/subr_witness.c +++ sys/kern/subr_witness.c @@ -1344,14 +1344,6 @@ * is allowed or has already been yelled about. */ - /* - * If the lock order is blessed, just bail. We don't - * look for other lock order violations though, which - * may be a bug. - */ - if (blessed(w, w1)) - goto out; - /* Bail if this violation is known */ if (w_rmatrix[w1->w_index][w->w_index] & WITNESS_REVERSAL) goto out; @@ -1361,6 +1353,14 @@ w_rmatrix[w->w_index][w1->w_index] |= WITNESS_REVERSAL; w->w_reversed = w1->w_reversed = 1; witness_increment_graph_generation(); + + /* + * If the lock order is blessed, bail before logging + * anything. We don't look for other lock order + * violations though, which may be a bug. + */ + if (blessed(w, w1)) + goto out; mtx_unlock_spin(&w_mtx); #ifdef WITNESS_NO_VNODE @@ -2651,6 +2651,9 @@ } mtx_unlock_spin(&w_mtx); + if (blessed(tmp_w1, tmp_w2)) + continue; + sbuf_printf(sb, "\nLock order reversal between \"%s\"(%s) and \"%s\"(%s)!\n", tmp_w1->w_name, tmp_w1->w_class->lc_name,