Commit 31a99848 authored by Vlad Buslov's avatar Vlad Buslov Committed by David S. Miller

net: sched: fw: don't set arg->stop in fw_walk() when empty

Some classifiers set arg->stop in their implementation of tp->walk() API
when empty. Most of classifiers do not adhere to that convention. Do not
set arg->stop in fw_walk() to unify tp->walk() behavior among classifier
implementations.

Fixes: ed76f5ed ("net: sched: protect filter_chain list with filter_chain_lock mutex")
Signed-off-by: default avatarVlad Buslov <vladbu@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1eb00162
...@@ -362,10 +362,7 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg, ...@@ -362,10 +362,7 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg,
struct fw_head *head = rtnl_dereference(tp->root); struct fw_head *head = rtnl_dereference(tp->root);
int h; int h;
if (head == NULL) if (head == NULL || arg->stop)
arg->stop = 1;
if (arg->stop)
return; return;
for (h = 0; h < HTSIZE; h++) { for (h = 0; h < HTSIZE; h++) {
......
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