diff options
author | Patrick McHardy <kaber@trash.net> | 2007-03-27 17:04:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-03-27 17:04:24 -0400 |
commit | c38c83cb705a41e30a99545ae2314c00e3b9bf1c (patch) | |
tree | 1d91f9303661f75c2104dd6db1d78f55445fc22c /net/sched/sch_hfsc.c | |
parent | 9b2f7bcf0efea98666da56073448647e2b373b67 (diff) |
[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_hfsc.c')
-rw-r--r-- | net/sched/sch_hfsc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c index 396deb71480f..407c6fb1ba14 100644 --- a/net/sched/sch_hfsc.c +++ b/net/sched/sch_hfsc.c | |||
@@ -1184,10 +1184,12 @@ hfsc_delete_class(struct Qdisc *sch, unsigned long arg) | |||
1184 | 1184 | ||
1185 | sch_tree_lock(sch); | 1185 | sch_tree_lock(sch); |
1186 | 1186 | ||
1187 | list_del(&cl->hlist); | ||
1188 | list_del(&cl->siblings); | 1187 | list_del(&cl->siblings); |
1189 | hfsc_adjust_levels(cl->cl_parent); | 1188 | hfsc_adjust_levels(cl->cl_parent); |
1189 | |||
1190 | hfsc_purge_queue(sch, cl); | 1190 | hfsc_purge_queue(sch, cl); |
1191 | list_del(&cl->hlist); | ||
1192 | |||
1191 | if (--cl->refcnt == 0) | 1193 | if (--cl->refcnt == 0) |
1192 | hfsc_destroy_class(sch, cl); | 1194 | hfsc_destroy_class(sch, cl); |
1193 | 1195 | ||