linux/drivers/infiniband
Mike Marciniszyn 09ce351dff IB/hfi1: Add limit test for RC/UC send via loopback
Fix potential memory corruption and panic in loopback for IB_WR_SEND
variants.

The code blindly assumes the posted length will fit in the fetched rwqe,
which is not a valid assumption.

Fix by adding a limit test, and triggering the appropriate send completion
and putting the QP in an error state.  This mimics the handling for
non-loopback QPs.

Fixes: 1570346153 ("IB/{hfi1, qib, rdmavt}: Move ruc_loopback to rdmavt")
Cc: <stable@vger.kernel.org> #v4.20+
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-01-21 14:20:08 -07:00
..
core RDMA/uverbs: Mark ioctl responses with UVERBS_ATTR_F_VALID_OUTPUT 2019-01-14 14:02:22 -07:00
hw IB/hfi1: Remove overly conservative VM_EXEC flag check 2019-01-21 14:20:08 -07:00
sw IB/hfi1: Add limit test for RC/UC send via loopback 2019-01-21 14:20:08 -07:00
ulp IB/ipoib: drop useless LIST_HEAD 2019-01-02 15:42:43 -07:00
Kconfig RDMA: Fix building with CONFIG_MMU=n 2018-10-03 16:01:03 -06:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00