提交 8b58d12f 编写于 作者: V Vlad Buslov 提交者: David S. Miller

net: sched: cgroup: verify that filter is not NULL during walk

Check that filter is not NULL before passing it to tcf_walker->fn()
callback in cls_cgroup_walk(). This can happen when cls_cgroup_change()
failed to set first filter.

Fixes: ed76f5ed ("net: sched: protect filter_chain list with filter_chain_lock mutex")
Signed-off-by: NVlad Buslov <vladbu@mellanox.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d66022cd
......@@ -158,6 +158,8 @@ static void cls_cgroup_walk(struct tcf_proto *tp, struct tcf_walker *arg,
if (arg->count < arg->skip)
goto skip;
if (!head)
return;
if (arg->fn(tp, head, arg) < 0) {
arg->stop = 1;
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册