[Bug 206368] [PATCH] kevent doesn't notify EV_ENABLE-ed events

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 18 13:52:14 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206368

            Bug ID: 206368
           Summary: [PATCH] kevent doesn't notify EV_ENABLE-ed events
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: taketsuru11 at gmail.com
          Keywords: patch

Created attachment 165759
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=165759&action=edit
reproduce

Kevent() doesn't notify an EV_ENABLE-ed event even though the notification
condition of the event is satisfied.  R274560 introduced this bug.

The following patch solves the issue.

diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index d41ac96..6584294 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -1284,7 +1284,8 @@ done_ev_add:
                kn->kn_status |= KN_DISABLED;
        }

-       if ((kn->kn_status & KN_DISABLED) == 0)
+       if ((kev->flags & EV_ENABLE) ||
+           (kn->kn_status & KN_DISABLED) == 0)
                event = kn->kn_fop->f_event(kn, 0);
        else
                event = 0;

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


More information about the freebsd-bugs mailing list