linux-uconsole/drivers/infiniband
Mike Marciniszyn fc3f15c672 IB/hfi1: Add limit test for RC/UC send via loopback
commit 09ce351dff upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
2019-02-12 19:47:26 +01:00
..
core RDMA/nldev: Don't expose unsafe global rkey to regular user 2019-01-22 21:40:34 +01:00
hw IB/hfi1: Add limit test for RC/UC send via loopback 2019-02-12 19:47:26 +01:00
sw rxe: IB_WR_REG_MR does not capture MR's iova field 2019-01-26 09:32:36 +01:00
ulp RDMA/srpt: Fix a use-after-free in the channel release code 2019-01-13 09:51:09 +01:00
Kconfig IB/ucm: fix UCM link error 2018-08-21 16:56:32 -06:00
Makefile