diff options
author | Patrick McHardy <kaber@trash.net> | 2008-07-01 22:53:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-01 22:53:09 -0400 |
commit | a4aebb83cf0da0363684f1c339f7e6149a3e74c1 (patch) | |
tree | b009adf7577ff4822ede398b1a162374ce32fb81 /net/sched/sch_atm.c | |
parent | ff31ab56c0e900235f653e375fc3b01ba2d8d6a3 (diff) |
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_atm.c')
-rw-r--r-- | net/sched/sch_atm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index 8e5f70ba3a15..db0e23ae85f8 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) | |||
586 | struct atm_flow_data *flow; | 586 | struct atm_flow_data *flow; |
587 | 587 | ||
588 | pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); | 588 | pr_debug("atm_tc_destroy(sch %p,[qdisc %p])\n", sch, p); |
589 | for (flow = p->flows; flow; flow = flow->next) | ||
590 | tcf_destroy_chain(&flow->filter_list); | ||
591 | |||
589 | /* races ? */ | 592 | /* races ? */ |
590 | while ((flow = p->flows)) { | 593 | while ((flow = p->flows)) { |
591 | tcf_destroy_chain(&flow->filter_list); | ||
592 | if (flow->ref > 1) | 594 | if (flow->ref > 1) |
593 | printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, | 595 | printk(KERN_ERR "atm_destroy: %p->ref = %d\n", flow, |
594 | flow->ref); | 596 | flow->ref); |