]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit1a483261e9da8139ab5d34220b699a91d012282d
tree7c99cd623d2647636494921ee4ed5af080ae1747
parent541aa1cd3a0a3b3ce6da196406044c1618d10ad8
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