Commit 4e6263ec authored by Zhengchao Shao's avatar Zhengchao Shao Committed by David S. Miller

net: sched: ensure n arg not empty before call bind_class

All bind_class callbacks are directly returned when n arg is empty.
Therefore, bind_class is invoked only when n arg is not empty.
Signed-off-by: default avatarZhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bc37b24e
...@@ -1915,7 +1915,7 @@ static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg) ...@@ -1915,7 +1915,7 @@ static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg)
{ {
struct tcf_bind_args *a = (void *)arg; struct tcf_bind_args *a = (void *)arg;
if (tp->ops->bind_class) { if (n && tp->ops->bind_class) {
struct Qdisc *q = tcf_block_q(tp->chain->block); struct Qdisc *q = tcf_block_q(tp->chain->block);
sch_tree_lock(q); sch_tree_lock(q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment