[PATCH] [2.4.20] filter_list destroy fix in net/sched/sch_csz.c

From: Dimitry V. Ketov (Dimitry.Ketov@avalon.ru)
Date: Fri Apr 11 2003 - 04:11:17 EST


Same as prio qdisc, the csz qdisc does not destroy its filter list, when
someone deletes qdisc from interface without explicit filter deleting.
So here is the patch. :)

--- linux-2.4.20/net/sched/sch_csz.c Fri Dec 21 20:42:06 2001
+++ linux/net/sched/sch_csz.c Fri Apr 11 12:33:08 2003
@@ -749,6 +749,15 @@
 static void
 csz_destroy(struct Qdisc* sch)
 {
+ struct csz_sched_data *q = (struct csz_sched_data *)sch->data;
+ struct tcf_proto *tp;
+
+ while((tp = q->filter_list) != NULL)
+ {
+ q->filter_list = tp->next;
+ tp->ops->destroy(tp);
+ }
+
         MOD_DEC_USE_COUNT;
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:23 EST