linux/drivers/infiniband
Michael J. Ruhl d59075ad1e IB/hfi1: Add a safe wrapper for _rcd_get_by_index
hfi1_rcd_get_by_index assumes that the given index is in the correct
range.  In most cases this is correct because the index is bounded by
a loop.  For these cases, adding a range check to the function is
redundant.

For the use case that is not bounded by the loop range, a _safe wrapper
function is needed to validate the index before accessing the rcd array.

Add a _safe wrapper to _get_by_index to validate the index range.

Update appropriate call sites with the new _safe function.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Signed-off-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-09-27 11:34:13 -04:00
..
core First -rc update for 4.14 kernel 2017-09-23 05:47:04 -10:00
hw IB/hfi1: Add a safe wrapper for _rcd_get_by_index 2017-09-27 11:34:13 -04:00
sw IB/rxe: Handle NETDEV_CHANGE events 2017-08-28 19:12:36 -04:00
ulp IB/ipoib: Suppress the retry related completion errors 2017-09-22 13:12:36 -04:00
Kconfig IB/core: Expose ioctl interface through experimental Kconfig 2017-08-31 08:35:14 -04:00
Makefile