aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv4/netfilter/arp_tables.c
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/ipv4/netfilter/arp_tables.c
parentnetfilter: nf_nat: don't bug when mapping already exists (diff)
downloadwireguard-linux-a5d7a714569199f909cd60ff7074107bf15c7db4.tar.xz
wireguard-linux-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/ipv4/netfilter/arp_tables.c')
-rw-r--r--net/ipv4/netfilter/arp_tables.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index e04457198f93..9e2770fd00be 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -629,6 +629,7 @@ static void get_counters(const struct xt_table_info *t,
ADD_COUNTER(counters[i], bcnt, pcnt);
++i;
+ cond_resched();
}
}
}