kernel - Add required kq_token around timer event
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 6 Sep 2010 18:05:19 +0000 (11:05 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 6 Sep 2010 18:05:19 +0000 (11:05 -0700)
* filt_timerexpire() is called from a callout and needs the kq_token.

sys/kern/kern_event.c

index 40c42ab..f964882 100644 (file)
@@ -338,6 +338,8 @@ filt_timerexpire(void *knx)
        struct timeval tv;
        int tticks;
 
+       lwkt_gettoken(&kq_token);
+
        kn->kn_data++;
        KNOTE_ACTIVATE(kn);
 
@@ -348,6 +350,8 @@ filt_timerexpire(void *knx)
                calloutp = (struct callout *)kn->kn_hook;
                callout_reset(calloutp, tticks, filt_timerexpire, kn);
        }
+
+       lwkt_reltoken(&kq_token);
 }
 
 /*