提交 da33e3eb 编写于 作者: S Stephen Hemminger 提交者: David S. Miller

[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: NDavid S. Miller <davem@davemloft.net>
上级 9e950efa
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册