summaryrefslogtreecommitdiff
path: root/net/ipv6/netfilter/ip6_tables.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2016-11-22 14:44:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-18 11:17:52 +0100
commit54e6e845c007c260ab3f728cc4f0870bdaf59054 (patch)
tree0a3d2b28ef080d595ec3a98fb6f1145dddaad649 /net/ipv6/netfilter/ip6_tables.c
parentde53c52f9d9317986b7ad69c8cca2d8554201354 (diff)
netfilter: x_tables: pass xt_counters struct to counter allocator
commit f28e15bacedd444608e25421c72eb2cf4527c9ca upstream. Keeps some noise away from a followup patch. Signed-off-by: Florian Westphal <fw@strlen.de> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6/netfilter/ip6_tables.c')
-rw-r--r--net/ipv6/netfilter/ip6_tables.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 274adecd6137..a4f39f7ca008 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -670,12 +670,9 @@ find_check_entry(struct ip6t_entry *e, struct net *net, const char *name,
unsigned int j;
struct xt_mtchk_param mtpar;
struct xt_entry_match *ematch;
- unsigned long pcnt;
- pcnt = xt_percpu_counter_alloc();
- if (IS_ERR_VALUE(pcnt))
+ if (!xt_percpu_counter_alloc(&e->counters))
return -ENOMEM;
- e->counters.pcnt = pcnt;
j = 0;
mtpar.net = net;