]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Convert kzalloc_node and kcalloc to use kcalloc_node
authorKamenee Arumugam <kamenee.arumugam@intel.com>
Thu, 1 Feb 2018 20:37:30 +0000 (12:37 -0800)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 1 Feb 2018 22:43:32 +0000 (15:43 -0700)
commit1f097cad0a8ac1fd6912f237289b0a48c72bb5f9
tree139004705604d5121675065b3ec0ebd26ce5b9a3
parent17f66a3bd854d80dc66a13c0450014a95e8967b9
IB/hfi1: Convert kzalloc_node and kcalloc to use kcalloc_node

Kzalloc_node API doesn't check for overflows in size multiplication.
While kcalloc API check for overflows in size multiplication
but these implementations are not NUMA-aware.

This conversion allowed for correcting an allocation used in the hot
path to be on the local NUMA and ensure us overflow free multiplication
for the size of a memory allocation.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Kamenee Arumugam <kamenee.arumugam@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/init.c
drivers/infiniband/hw/hfi1/pio.c
drivers/infiniband/hw/hfi1/sdma.c