diff options
author | Joe Perches <joe@perches.com> | 2020-01-28 11:07:27 -0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2020-01-31 19:30:54 +0100 |
commit | b9e0102a57d768bdb99cbbfa01225f73d58e03bc (patch) | |
tree | e346a266a1c2e3bbeaca92dbb22c00ec218e69cc /net/netfilter/x_tables.c | |
parent | netfilter: ipset: fix suspicious RCU usage in find_set_and_id (diff) | |
download | linux-dev-b9e0102a57d768bdb99cbbfa01225f73d58e03bc.tar.xz linux-dev-b9e0102a57d768bdb99cbbfa01225f73d58e03bc.zip |
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/x_tables.c')
-rw-r--r-- | net/netfilter/x_tables.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index ce70c2576bb2..e27c6c5ba9df 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c @@ -939,14 +939,14 @@ EXPORT_SYMBOL(xt_check_entry_offsets); * * @size: number of entries * - * Return: NULL or kmalloc'd or vmalloc'd array + * Return: NULL or zeroed kmalloc'd or vmalloc'd array */ unsigned int *xt_alloc_entry_offsets(unsigned int size) { if (size > XT_MAX_TABLE_SIZE / sizeof(unsigned int)) return NULL; - return kvmalloc_array(size, sizeof(unsigned int), GFP_KERNEL | __GFP_ZERO); + return kvcalloc(size, sizeof(unsigned int), GFP_KERNEL); } EXPORT_SYMBOL(xt_alloc_entry_offsets); |