linux/drivers/infiniband
Mike Marciniszyn dc0db9e2ca 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>
History 2019-02-06 17:27:43 +01:00
..
core IB/uverbs: Fix OOPs in uverbs_user_mmap_disassociate 2019-02-06 17:27:43 +01:00
hw IB/hfi1: Remove overly conservative VM_EXEC flag check 2019-02-06 17:27:43 +01:00
sw IB/hfi1: Add limit test for RC/UC send via loopback 2019-02-06 17:27:43 +01:00
ulp RDMA/srpt: Fix a use-after-free in the channel release code 2019-01-13 09:24:08 +01: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