]> git.itanic.dy.fi Git - linux-stable/commit
IB/hfi1: Fix SL array bounds check
authorIra Weiny <ira.weiny@intel.com>
Thu, 20 Sep 2018 19:58:46 +0000 (12:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:56 +0000 (17:00 -0700)
commitd9e49e9ed8d6f59dfc7c34f904d99462829fecc1
treea9de3f1d4fed336b29e79b7f57faf276be8ed1be
parentfcbe49c82b8242fd8a45309c30c6f887f14ab83b
IB/hfi1: Fix SL array bounds check

commit 0dbfaa9f2813787679e296eb5476e40938ab48c8 upstream.

The SL specified by a user needs to be a valid SL.

Add a range check to the user specified SL value which protects from
running off the end of the SL to SC table.

CC: stable@vger.kernel.org
Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/hw/hfi1/verbs.c