aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_route.c
diff options
context:
space:
mode:
authorVlad Buslov <vladbu@mellanox.com>2019-02-15 17:21:00 +0200
committerDavid S. Miller <davem@davemloft.net>2019-02-17 13:24:39 -0800
commit3027ff41f67cbef1ad58af68601455db81b0fae5 (patch)
tree814098233c0c66e8b808d7eca69c8ad4bfd40b63 /net/sched/cls_route.c
parentnet: sched: fw: don't set arg->stop in fw_walk() when empty (diff)
downloadlinux-dev-3027ff41f67cbef1ad58af68601455db81b0fae5.tar.xz
linux-dev-3027ff41f67cbef1ad58af68601455db81b0fae5.zip
net: sched: route: don't set arg->stop in route4_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 route4_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_route.c')
-rw-r--r--net/sched/cls_route.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index e590c3a2999d..444d15a75d98 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -567,10 +567,7 @@ static void route4_walk(struct tcf_proto *tp, struct tcf_walker *arg,
struct route4_head *head = rtnl_dereference(tp->root);
unsigned int h, h1;
- if (head == NULL)
- arg->stop = 1;
-
- if (arg->stop)
+ if (head == NULL || arg->stop)
return;
for (h = 0; h <= 256; h++) {