summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-09-01 22:41:03 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-09-08 18:55:27 +0200
commita5d7a714569199f909cd60ff7074107bf15c7db4 (patch)
tree01c6ff04f1380de21901684cb8587e807a1d92e1 /net/ipv6
parent75c2631468e8af554057246b2413e738dd96af3d (diff)
downloadlinux-stable-a5d7a714569199f909cd60ff7074107bf15c7db4.tar.gz
linux-stable-a5d7a714569199f909cd60ff7074107bf15c7db4.tar.bz2
linux-stable-a5d7a714569199f909cd60ff7074107bf15c7db4.zip
netfilter: xtables: add scheduling opportunity in get_counters
There are reports about spurious softlockups during iptables-restore, a backtrace i saw points at get_counters -- it uses a sequence lock and also has unbounded restart loop. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 54b1e75eded1..01bd3ee5ebc6 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -795,6 +795,7 @@ get_counters(const struct xt_table_info *t,
ADD_COUNTER(counters[i], bcnt, pcnt);
++i;
+ cond_resched();
}
}
}