svn commit: r310584 - stable/10/sys/kern
Konstantin Belousov
kib at FreeBSD.org
Mon Dec 26 10:13:54 UTC 2016
Author: kib
Date: Mon Dec 26 10:13:53 2016
New Revision: 310584
URL: https://svnweb.freebsd.org/changeset/base/310584
Log:
MFC r310302:
Do not clear KN_INFLUX when not owning influx state.
PR: 214923
Modified:
stable/10/sys/kern/kern_event.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/kern/kern_event.c
==============================================================================
--- stable/10/sys/kern/kern_event.c Mon Dec 26 10:03:33 2016 (r310583)
+++ stable/10/sys/kern/kern_event.c Mon Dec 26 10:13:53 2016 (r310584)
@@ -1935,6 +1935,7 @@ knote(struct knlist *list, long hint, in
struct kqueue *kq;
struct knote *kn, *tkn;
int error;
+ bool own_influx;
if (list == NULL)
return;
@@ -1965,11 +1966,14 @@ knote(struct knlist *list, long hint, in
*/
KQ_UNLOCK(kq);
} else if ((lockflags & KNF_NOKQLOCK) != 0) {
- kn->kn_status |= KN_INFLUX;
+ own_influx = (kn->kn_status & KN_INFLUX) == 0;
+ if (own_influx)
+ kn->kn_status |= KN_INFLUX;
KQ_UNLOCK(kq);
error = kn->kn_fop->f_event(kn, hint);
KQ_LOCK(kq);
- kn->kn_status &= ~KN_INFLUX;
+ if (own_influx)
+ kn->kn_status &= ~KN_INFLUX;
if (error)
KNOTE_ACTIVATE(kn, 1);
KQ_UNLOCK_FLUX(kq);
More information about the svn-src-stable
mailing list