提交 63cc5bcc 编写于 作者: J Jiri Pirko 提交者: David S. Miller

net: sched: fix block->refcnt decrement

Currently the refcnt is never decremented in case the value is not 1.
Fix it by adding decrement in case the refcnt is not 1.
Reported-by: NVlad Buslov <vladbu@mellanox.com>
Fixes: f71e0ca4 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: NJiri Pirko <jiri@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0bab1cdc
......@@ -780,6 +780,8 @@ void tcf_block_put_ext(struct tcf_block *block, struct Qdisc *q,
block->refcnt--;
if (list_empty(&block->chain_list))
kfree(block);
} else {
block->refcnt--;
}
}
EXPORT_SYMBOL(tcf_block_put_ext);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册