⬢ DragonFlyBSD Kernel Audit
DF-2787 / fix.diff
← back to finding ↓ download raw
--- a/sys/sys/mutex2.h	2026-06-29 12:51:19.000000000 +0000
+++ b/sys/sys/mutex2.h	2026-10-26 00:25:42.773043131 +0000
@@ -438,7 +438,7 @@
 static __inline int
 mtx_notlocked_ex(mtx_t *mtx)
 {
-	return((mtx->mtx_lock & MTX_EXCLUSIVE) != 0);
+	return((mtx->mtx_lock & MTX_EXCLUSIVE) == 0);
 }
 
 /*