DragonFlyBSD Kernel Audit
DF-0204 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c
--- a/sys/kern/kern_umtx.c
+++ b/sys/kern/kern_umtx.c
@@ -294,10 +294,12 @@
 	return EINVAL;
     }
 
-    if (uap->count == 1) {
+    if (uap->count <= 1) {
 	wakeup_domain_one(waddr, PDOMAIN_UMTX);
     } else {
-	/* XXX wakes them all up for now */
+	/* XXX wakes them all up for now.  A bounded wakeup that respects
+	 * uap->count would require iterating the wait list, which is not
+	 * currently exposed by the sleepq API. */
 	wakeup_domain(waddr, PDOMAIN_UMTX);
     }
     error = 0;