Date: Sun, 11 Mar 2007 20:22:51 GMT From: Kapil Jain<kapiltj@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/110199: Kqueue: kqueue_register doesn't update the knote flags (kn_flags) Message-ID: <200703112022.l2BKMpd2019991@www.freebsd.org> Resent-Message-ID: <200703112030.l2BKU4bH094282@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110199 >Category: kern >Synopsis: Kqueue: kqueue_register doesn't update the knote flags (kn_flags) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 11 20:30:04 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Kapil Jain >Release: 4.10, 6.1 >Organization: Juniper networks >Environment: >Description: Kqueue_register should be initializing the kn_flags, but it doesn't. This leads to a discrepancy between the kn_status flags and the kn_flags. >How-To-Repeat: If you enable a read event and then disable it, the kn_flags will show the enable and kn_status disable. >Fix: This patch may fix the problem. Index: kern_event.c =================================================================== RCS file: /cvs/junos-2001/src/sys/kern/kern_event.c,v retrieving revision 1.4 diff -c -r1.4 kern_event.c *** kern_event.c 14 Feb 2005 02:04:33 -0000 1.4 --- kern_event.c 11 Mar 2007 20:21:56 -0000 *************** *** 568,573 **** --- 568,575 ---- goto done; } + kn->kn_flags = kev->flags; + if ((kev->flags & EV_DISABLE) && ((kn->kn_status & KN_DISABLED) == 0)) { s = splhigh(); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703112022.l2BKMpd2019991>