* net-sched 02/02: fix filter destruction in atm/hfsc qdisc destruction
@ 2008-07-01 10:06 Patrick McHardy
0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2008-07-01 10:06 UTC (permalink / raw)
To: David S. Miller; +Cc: Linux Netdev List
[-- Attachment #1: Type: text/plain, Size: 0 bytes --]
[-- Attachment #2: 02.diff --]
[-- Type: text/x-diff, Size: 1478 bytes --]
commit 096191c2ded6435a9a22fe0e2ee494b6e7686f95
Author: Patrick McHardy <kaber@trash.net>
Date: Thu Jun 26 18:55:20 2008 +0200
net-sched: fix filter destruction in atm/hfsc qdisc destruction
Filters need to be destroyed before beginning to destroy classes
since the destination class needs to still be alive to unbind the
filter.
Signed-off-by: Patrick McHardy <kaber@trash.net>
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index 8e5f70b..db0e23a 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -586,9 +586,11 @@ static void atm_tc_destroy(struct Qdisc *sch)
struct atm_flow_data *flow;
pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p);
+ for (flow = p->flows; flow; flow = flow->next)
+ tcf_destroy_chain(&flow->filter_list);
+
/* races ? */
while ((flow = p->flows)) {
- tcf_destroy_chain(&flow->filter_list);
if (flow->ref > 1)
printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow,
flow->ref);
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index eca83a3..e817aa0 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -1541,6 +1541,10 @@ hfsc_destroy_qdisc(struct Qdisc *sch)
unsigned int i;
for (i = 0; i < HFSC_HSIZE; i++) {
+ list_for_each_entry(cl, &q->clhash[i], hlist)
+ tcf_destroy_chain(&cl->filter_list);
+ }
+ for (i = 0; i < HFSC_HSIZE; i++) {
list_for_each_entry_safe(cl, next, &q->clhash[i], hlist)
hfsc_destroy_class(sch, cl);
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-01 10:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 10:06 net-sched 02/02: fix filter destruction in atm/hfsc qdisc destruction Patrick McHardy
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).