]> git.baikalelectronics.ru Git - kernel.git/commit
IB/hfi1: Ensure ucast_dlid access doesnt exceed bounds
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Wed, 26 Sep 2018 17:55:53 +0000 (10:55 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 1 Oct 2018 01:21:12 +0000 (19:21 -0600)
commitd7205cc4939b7ca3fc7f25d3e831036f061a4aef
tree6fe22e4e9a524e1db802c354607e1ba2e9f20c17
parenta0b13c1df5f409966f73a1d1aa829f675412b253
IB/hfi1: Ensure ucast_dlid access doesnt exceed bounds

The dlid assignment made by looking into the u_ucast_dlid array does not
do an explicit check for the size of the array. The code path to arrive at
def_port, the index value is long and complicated so its best to just have
an explicit check here.

Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/ulp/opa_vnic/opa_vnic_encap.c