liquidio: Replace vmalloc_node + memset with vzalloc_node and use array_size
authorGustavo A. R. Silva <gustavoars@kernel.org>
Mon, 15 Jun 2020 21:18:55 +0000 (16:18 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 17 Jun 2020 22:04:03 +0000 (15:04 -0700)
commit682591f7a6fae0cba255af889fae3d6e211d4d25
tree7c99cd623d2647636494921ee4ed5af080ae1747
parentcad2929dc4321b1f237767e9bd271b61a2eaa752
liquidio: Replace vmalloc_node + memset with vzalloc_node and use array_size

Use vzalloc/vzalloc_node instead of the vmalloc/vzalloc_node and memset.

Also, notice that vzalloc_node() function has no 2-factor argument form
to calculate the size for the allocation, so multiplication factors need
to be wrapped in array_size().

This issue was found with the help of Coccinelle and, audited and fixed
manually.

Addresses-KSPP-ID: https://github.com/KSPP/linux/issues/83
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/request_manager.c