Page MenuHomeFreeBSD

D11788.id31439.diff
No OneTemporary

D11788.id31439.diff

Index: head/sys/kern/subr_witness.c
===================================================================
--- head/sys/kern/subr_witness.c
+++ head/sys/kern/subr_witness.c
@@ -1850,11 +1850,13 @@
found:
w->w_refcount++;
mtx_unlock_spin(&w_mtx);
- if (lock_class != w->w_class)
+ if (w->w_refcount == 1)
+ w->w_class = lock_class;
+ else if (lock_class != w->w_class)
kassert_panic(
- "lock (%s) %s does not match earlier (%s) lock",
- description, lock_class->lc_name,
- w->w_class->lc_name);
+ "lock (%s) %s does not match earlier (%s) lock",
+ description, lock_class->lc_name,
+ w->w_class->lc_name);
return (w);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 8:09 AM (1 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30984142
Default Alt Text
D11788.id31439.diff (651 B)

Event Timeline