]> asedeno.scripts.mit.edu Git - linux.git/commit
IB/hfi1: Use QPN mask to avoid overflow
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Tue, 30 May 2017 00:19:21 +0000 (17:19 -0700)
committerDoug Ledford <dledford@redhat.com>
Tue, 27 Jun 2017 20:58:12 +0000 (16:58 -0400)
commit6c31e5283cb06b81a13cc88da2f2ad3db594a935
tree9f0c07b33111f9a1cbab1759a946e2a18426c9d2
parent67838e64fa63415fe4e0da7149bcb123ed9f5612
IB/hfi1: Use QPN mask to avoid overflow

Ensure we can't come up with an array size that is bigger than the array
by applying the QPN mask before the divide in the free_qpn function.

Reviewed-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>
drivers/infiniband/sw/rdmavt/qp.c