IB/hfi1: Ensure VL index is within bounds
authorKaike Wan <kaike.wan@intel.com>
Thu, 31 May 2018 18:30:17 +0000 (11:30 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 4 Jun 2018 19:33:16 +0000 (13:33 -0600)
commitf9458bc2c1303bcbd02645de0d59e4b0210c669a
tree124b19317d8046fe398338455f6b5f97aa076030
parent1bc0299d976e000ececc6acd76e33b4582646cb7
IB/hfi1: Ensure VL index is within bounds

Improve the safety of the code and ensure the array cannot be indexed
out of bounds when picking the CPU for a given SDMA engine.

Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/sdma.c