sch_prio.c and sch_csz.c 2.4.20 patches for correct filter destroying
Subsystems (2)
Recently I've posted these patches in lkml and netdev mailing lists. Just repeating them here if someone is interesting: sch_prio.c and sch_csz.c do not destroy their filter lists, when someone deletes qdisc from interface without explicit filter deleting. So here is the patches. :)
net/sched/sch_prio.c +8 -0
@@ -158,11 +158,19 @@ {int prio;struct prio_sched_data *q = (struct prio_sched_data *)sch->data; +struct tcf_proto *tp;for (prio=0 ; prio<q->bands; prio++) {qdisc_destroy (q->queues[prio]); q->queues[prio] = &noop_qdisc; } + +while ((tp = q->filter_list) !=NULL ) + { + q->filter_list = tp->next; + tp->ops->destroy (tp); + } +MOD_DEC_USE_COUNT ; }
net/sched/sch_csz.c +9 -0
@@ -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 ; }
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/