altq: ifq needs protection here; not ifnet
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sat, 4 Apr 2009 08:51:40 +0000 (16:51 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 5 Apr 2009 02:08:17 +0000 (10:08 +0800)
sys/net/altq/altq_rmclass.c

index 93705f2..10d8bc0 100644 (file)
@@ -1515,7 +1515,7 @@ rmc_restart(void *arg)
        struct rm_class *cl = arg;
        struct rm_ifdat *ifd = cl->ifdat_;
 
-       lwkt_serialize_enter(ifd->ifq_->altq_ifp->if_serializer);
+       ALTQ_LOCK(ifd->ifq_);
        if (cl->sleeping_) {
                cl->sleeping_ = 0;
                cl->undertime_.tv_sec = 0;
@@ -1525,7 +1525,7 @@ rmc_restart(void *arg)
                        (ifd->restart)(ifd->ifq_);
                }
        }
-       lwkt_serialize_exit(ifd->ifq_->altq_ifp->if_serializer);
+       ALTQ_UNLOCK(ifd->ifq_);
 }
 
 /*