Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jan 2016 13:52:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 206368] [PATCH] kevent doesn't notify EV_ENABLE-ed events
Message-ID:  <bug-206368-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206368

            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@FreeBSD.org
          Reporter: taketsuru11@gmail.com
          Keywords: patch

Created attachment 165759
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D165759&action=
=3Dedit
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 |=3D KN_DISABLED;
        }

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

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-206368-8>