IB/hfi1: Do not read more than a SGE length
authorSebastian Sanchez <sebastian.sanchez@intel.com>
Sun, 25 Sep 2016 14:41:32 +0000 (07:41 -0700)
committerDoug Ledford <dledford@redhat.com>
Sun, 2 Oct 2016 12:42:13 +0000 (08:42 -0400)
commita4309d94f71067f622a1d4e65d8d0fc4710beefd
tree5953d93bf8e82c1ffc4eb5913909a3f145fd829e
parentd5cf683e627ae0c4f338bf175fe4e12584acdc0f
IB/hfi1: Do not read more than a SGE length

In certain cases, if the tail of an SGE is not
8-byte aligned, bytes beyond the end to an 8-byte
alignment can be read. Change the copy routine
to avoid the over-read. Instead, stop on the final
whole quad-word, then read the remaining bytes.

Reviewed-by: Dean Luick <dean.luick@intel.com>
Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/pio_copy.c