summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-07-07 09:15:29 +0000
committerkib <kib@FreeBSD.org>2008-07-07 09:15:29 +0000
commitea1979e3d2b54ba0ce259e583ff88846d8108407 (patch)
treef719e75198c8ad5db176ec121dd72dbde68c8db7
parent5a1c985723817db33991c18bb36c353b38218f93 (diff)
downloadFreeBSD-src-ea1979e3d2b54ba0ce259e583ff88846d8108407.zip
FreeBSD-src-ea1979e3d2b54ba0ce259e583ff88846d8108407.tar.gz
The r178914 I erronously put the setting of the KQ_FLUXWAIT flag before
KQ_FLUX_WAKEUP(). Since the later macro clears the KQ_FLUXWAIT, the kqueue_scan() thread may be not woken up. Move the setting of KQ_FLUXWAIT after wakeup to correct the issue. Reported and tested by: pho MFC after: 3 days
-rw-r--r--sys/kern/kern_event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
index b031fa0..36331be 100644
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -1211,12 +1211,11 @@ start:
if ((kn->kn_status == KN_MARKER && kn != marker) ||
(kn->kn_status & KN_INFLUX) == KN_INFLUX) {
- kq->kq_state |= KQ_FLUXWAIT;
if (influx) {
influx = 0;
KQ_FLUX_WAKEUP(kq);
}
-
+ kq->kq_state |= KQ_FLUXWAIT;
error = msleep(kq, &kq->kq_lock, PSOCK,
"kqflxwt", 0);
continue;
OpenPOWER on IntegriCloud