git: 1ede9ecfe610 - stable/15 - kqueue: Associate marker knotes with a queue
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Aug 2026 15:01:38 UTC
The branch stable/15 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=1ede9ecfe61017cc28ebeb4e65506ed0efa59408
commit 1ede9ecfe61017cc28ebeb4e65506ed0efa59408
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-07-29 12:43:55 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-08-06 13:24:43 +0000
kqueue: Associate marker knotes with a queue
Otherwise the assertion in KQ_FLUX_SLEEP_WMESG may fail.
kqueue_fork_copy() already handles this.
Fixes: 1f4b0ea4f3eb ("kqueue: Add a helper macro for sleeping on in-flux knotes")
Reported by: syzkaller
Reported by: kbowling
Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58516
(cherry picked from commit 9a9349ea1da2d80e979fa87b430551d8f6dac7f4)
---
sys/kern/kern_event.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index 0a02642cccae..3990c2366ab4 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -2160,6 +2160,7 @@ kqueue_scan(struct kqueue *kq, int maxevents, struct kevent_copyops *k_ops,
asbt = 0;
memset(&marker, 0, sizeof(marker));
marker.kn_status = KN_MARKER;
+ marker.kn_kq = kq;
KQ_LOCK(kq);
retry: