summaryrefslogtreecommitdiffstats
path: root/net/sched/cls_fw.c
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-02-15 16:20:07 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-17 22:24:18 +0100
commit31a998487641bc35bc7465781486ea8f8ddc0b82 (patch)
tree30ee580b4a167070a2f42557ba7416545ea68229 /net/sched/cls_fw.c
parentnet: caif: use skb helpers instead of open-coding them (diff)
downloadlinux-31a998487641bc35bc7465781486ea8f8ddc0b82.tar.xz
linux-31a998487641bc35bc7465781486ea8f8ddc0b82.zip
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: ed76f5edccc9 ("net: sched: protect filter_chain list with filter_chain_lock mutex") Signed-off-by: Vlad Buslov <vladbu@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_fw.c')
-rw-r--r--net/sched/cls_fw.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 317151bae73b..4e34966f2ae2 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -362,10 +362,7 @@ static void fw_walk(struct tcf_proto *tp, struct tcf_walker *arg,
struct fw_head *head = rtnl_dereference(tp->root);
int h;
- if (head == NULL)
- arg->stop = 1;
-
- if (arg->stop)
+ if (head == NULL || arg->stop)
return;
for (h = 0; h < HTSIZE; h++) {