aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/nf_conntrack_core.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2020-01-28 11:07:27 -0800
committerPablo Neira Ayuso <pablo@netfilter.org>2020-01-31 19:30:54 +0100
commitb9e0102a57d768bdb99cbbfa01225f73d58e03bc (patch)
treee346a266a1c2e3bbeaca92dbb22c00ec218e69cc /net/netfilter/nf_conntrack_core.c
parent5038517119d50ed0240059b1d7fc2faa92371c08 (diff)
downloadlinux-b9e0102a57d768bdb99cbbfa01225f73d58e03bc.tar.gz
netfilter: Use kvcalloc
Convert the uses of kvmalloc_array with __GFP_ZERO to the equivalent kvcalloc. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_conntrack_core.c')
-rw-r--r--net/netfilter/nf_conntrack_core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index f4c4b467c87e9a..d1305423640f3a 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -2248,8 +2248,7 @@ void *nf_ct_alloc_hashtable(unsigned int *sizep, int nulls)
BUILD_BUG_ON(sizeof(struct hlist_nulls_head) != sizeof(struct hlist_head));
nr_slots = *sizep = roundup(*sizep, PAGE_SIZE / sizeof(struct hlist_nulls_head));
- hash = kvmalloc_array(nr_slots, sizeof(struct hlist_nulls_head),
- GFP_KERNEL | __GFP_ZERO);
+ hash = kvcalloc(nr_slots, sizeof(struct hlist_nulls_head), GFP_KERNEL);
if (hash && nulls)
for (i = 0; i < nr_slots; i++)