diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-11-07 17:54:46 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-11-07 18:10:12 -0500 |
commit | da33e3eb4876c43b78fdc7b7068653239f28714a (patch) | |
tree | 2e7f0d60e32be15dcf907058ea4996a8369e3664 | |
parent | 9e950efa20dc8037c27509666cba6999da9368e8 (diff) |
[PKT_SCHED] sch_htb: Use hlist_del_init().
Otherwise we can hit paths that (legally) do multiple deletes on the
same node and OOPS with the HLIST poison values there instead of
NULL.
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sched/sch_htb.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 9b9c555c713f..4b52fa78935a 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -1284,8 +1284,7 @@ static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) | |||
1284 | struct htb_class, sibling)); | 1284 | struct htb_class, sibling)); |
1285 | 1285 | ||
1286 | /* note: this delete may happen twice (see htb_delete) */ | 1286 | /* note: this delete may happen twice (see htb_delete) */ |
1287 | if (!hlist_unhashed(&cl->hlist)) | 1287 | hlist_del_init(&cl->hlist); |
1288 | hlist_del(&cl->hlist); | ||
1289 | list_del(&cl->sibling); | 1288 | list_del(&cl->sibling); |
1290 | 1289 | ||
1291 | if (cl->prio_activity) | 1290 | if (cl->prio_activity) |
@@ -1333,8 +1332,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) | |||
1333 | sch_tree_lock(sch); | 1332 | sch_tree_lock(sch); |
1334 | 1333 | ||
1335 | /* delete from hash and active; remainder in destroy_class */ | 1334 | /* delete from hash and active; remainder in destroy_class */ |
1336 | if (!hlist_unhashed(&cl->hlist)) | 1335 | hlist_del_init(&cl->hlist); |
1337 | hlist_del(&cl->hlist); | ||
1338 | 1336 | ||
1339 | if (cl->prio_activity) | 1337 | if (cl->prio_activity) |
1340 | htb_deactivate(q, cl); | 1338 | htb_deactivate(q, cl); |