From: "Dimitry V. Ketov" <Dimitry.Ketov@avalon.ru>
To: lartc@vger.kernel.org
Subject: [LARTC] sch_prio.c and sch_csz.c 2.4.20 patches for correct filter destroying
Date: Fri, 11 Apr 2003 12:31:05 +0000 [thread overview]
Message-ID: <marc-lartc-105006435523344@msgid-missing> (raw)
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.
:)
--- 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;
}
--- 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;
}
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
reply other threads:[~2003-04-11 12:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-105006435523344@msgid-missing \
--to=dimitry.ketov@avalon.ru \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.