[Bug 258310] kevent() does not see signal with zero timeout

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 06 Sep 2021 23:44:43 UTC

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:


commit 98168a6e6c12dab8f608f6b5f5b0b175d2b87ef0
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-09-06 11:43:06 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-09-06 23:43:34 +0000

    kqueue: drain kqueue taskqueue if syscall tickled it

    Otherwise return from the syscall and next syscall, which could be
    kevent(2) on the kqueue that should be notified, races with the kqueue
    taskqueue thread, and potentially misses the wakeup.  This is reliably
    visible when kevent(2) only peeks into events using zeroed timeout.

    PR:     258310
    Reported by:    arichardson, Jan Kokemüller <jan.kokemueller@gmail.com>
    Reviewed by:    arichardson, markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D31858

 sys/kern/kern_event.c | 11 +++++++++++
 sys/kern/subr_trap.c  |  7 ++++++-
 sys/sys/event.h       |  1 +
 sys/sys/proc.h        |  2 +-
 4 files changed, 19 insertions(+), 2 deletions(-)

You are receiving this mail because:
You are the assignee for the bug.