linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [2.4.20] filter_list destroy fix in net/sched/sch_prio.c
@ 2003-04-10 17:46 Dimitry V. Ketov
  2003-04-10 17:57 ` jamal
  0 siblings, 1 reply; 3+ messages in thread
From: Dimitry V. Ketov @ 2003-04-10 17:46 UTC (permalink / raw)
  To: netdev, linux-kernel; +Cc: kuznet

The prio qdisc does not destroy its filter list, when someone deletes
qdisc from interface without explicit filter deleting.
This patch fixes that behavior. 

--- linux-2.4.20/net/sched/sch_prio.c	Sat Aug  3 04:39:46 2002
+++ linux/net/sched/sch_prio.c	Thu Apr 10 17:52:55 2003
@@ -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;
 }


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-04-12  7:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-10 17:46 [PATCH] [2.4.20] filter_list destroy fix in net/sched/sch_prio.c Dimitry V. Ketov
2003-04-10 17:57 ` jamal
2003-04-12  7:32   ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).