diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-27 23:04:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-03-27 23:04:24 +0200 |
commit | c38c83cb705a41e30a99545ae2314c00e3b9bf1c (patch) | |
tree | 1d91f9303661f75c2104dd6db1d78f55445fc22c /net/sched/sch_htb.c | |
parent | [NET]: Remove dead net/sched/Makefile entry for sch_hpfq.o. (diff) | |
download | linux-c38c83cb705a41e30a99545ae2314c00e3b9bf1c.tar.xz linux-c38c83cb705a41e30a99545ae2314c00e3b9bf1c.zip |
[NET_SCHED]: sch_htb/sch_hfsc: fix oops in qlen_notify
During both HTB and HFSC class deletion the class is removed from the
class hash before calling qdisc_tree_decrease_qlen. This makes the
->get operation in qdisc_tree_decrease_qlen fail, so it passes a NULL
pointer to ->qlen_notify, causing an oops.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_htb.c')
-rw-r--r-- | net/sched/sch_htb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 97cbb9aec946..3c3294d01041 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -1380,15 +1380,15 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) sch_tree_lock(sch); - /* delete from hash and active; remainder in destroy_class */ - hlist_del_init(&cl->hlist); - if (!cl->level) { qlen = cl->un.leaf.q->q.qlen; qdisc_reset(cl->un.leaf.q); qdisc_tree_decrease_qlen(cl->un.leaf.q, qlen); } + /* delete from hash and active; remainder in destroy_class */ + hlist_del_init(&cl->hlist); + if (cl->prio_activity) htb_deactivate(q, cl); |