* [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
* Re: [PATCH] [2.4.20] filter_list destroy fix in net/sched/sch_prio.c
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
0 siblings, 1 reply; 3+ messages in thread
From: jamal @ 2003-04-10 17:57 UTC (permalink / raw)
To: Dimitry V. Ketov; +Cc: netdev, linux-kernel, kuznet
Looks good to me.
cheers,
jamal
On Thu, 10 Apr 2003, Dimitry V. Ketov wrote:
> 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
* Re: [PATCH] [2.4.20] filter_list destroy fix in net/sched/sch_prio.c
2003-04-10 17:57 ` jamal
@ 2003-04-12 7:32 ` David S. Miller
0 siblings, 0 replies; 3+ messages in thread
From: David S. Miller @ 2003-04-12 7:32 UTC (permalink / raw)
To: jamal; +Cc: Dimitry V. Ketov, netdev, linux-kernel, Alexey N. Kuznetsov
On Thu, 2003-04-10 at 10:57, jamal wrote:
> Looks good to me.
He missed sch_csz.c, I already sent a patch I wrote for this
to Linus and Marcelo will get a copy soon'ish.
--
David S. Miller <davem@redhat.com>
^ 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).