From: Stephen Hemminger Date: Tue, 7 Nov 2006 22:54:46 +0000 (-0800) Subject: [PKT_SCHED] sch_htb: Use hlist_del_init(). X-Git-Tag: v2.6.19-rc6~71^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da33e3eb4876c43b78fdc7b7068653239f28714a;p=linux-2.6 [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 --- diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 9b9c555c71..4b52fa7893 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) struct htb_class, sibling)); /* note: this delete may happen twice (see htb_delete) */ - if (!hlist_unhashed(&cl->hlist)) - hlist_del(&cl->hlist); + hlist_del_init(&cl->hlist); list_del(&cl->sibling); if (cl->prio_activity) @@ -1333,8 +1332,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg) sch_tree_lock(sch); /* delete from hash and active; remainder in destroy_class */ - if (!hlist_unhashed(&cl->hlist)) - hlist_del(&cl->hlist); + hlist_del_init(&cl->hlist); if (cl->prio_activity) htb_deactivate(q, cl);