diff options
author | jmg <jmg@FreeBSD.org> | 2006-03-29 18:15:30 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2006-03-29 18:15:30 +0000 |
commit | fc54b4c09076eae2b71d8a829e7833ce948805ca (patch) | |
tree | 874f4cf90b574922a11af8144718074cfb474a97 | |
parent | b19d325a18dac138ac1d6210abf09f4f6665b2a4 (diff) | |
download | FreeBSD-src-fc54b4c09076eae2b71d8a829e7833ce948805ca.zip FreeBSD-src-fc54b4c09076eae2b71d8a829e7833ce948805ca.tar.gz |
hold the list lock over the f_event and KNOTE_ACTIVATE calls... This closes
a race where data could come in before we clear the INFLUX flag, and get
skipped over by knote (and hence never be activated, though it should of
been)...
Found by: glebius & co.
Reviewed by: glebius
MFC after: 3 days
-rw-r--r-- | sys/kern/kern_event.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 3419101..8fdcb8d 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -923,11 +923,11 @@ findkn: * which will remove it from the list, and NULL kn_knlist. */ event = kn->kn_fop->f_event(kn, 0); - KN_LIST_UNLOCK(kn); KQ_LOCK(kq); if (event) KNOTE_ACTIVATE(kn, 1); kn->kn_status &= ~KN_INFLUX; + KN_LIST_UNLOCK(kn); } else if (kev->flags & EV_DELETE) { kn->kn_status |= KN_INFLUX; KQ_UNLOCK(kq); |