Star64_linux/drivers/infiniband/sw/rdmavt
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
..
ah.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
ah.h RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
cq.c
cq.h
Kconfig IB/{hfi1, qib, rdmavt}: Move copy SGE logic into rdmavt 2018-10-03 16:38:28 -06:00
mad.c RDMA: Mark if destroy address handle is in a sleepable context 2018-12-19 16:28:03 -07:00
mad.h
Makefile
mcast.c
mcast.h
mmap.c
mmap.h
mr.c
mr.h
pd.c
pd.h
qp.c IB/hfi1: Add limit test for RC/UC send via loopback 2019-01-21 14:20:08 -07:00
qp.h IB/{hfi1, qib, rdmavt}: Move copy SGE logic into rdmavt 2018-10-03 16:38:28 -06:00
rc.c
srq.c RDMA/providers: Fix return value from create_srq callbacks 2018-07-30 20:29:45 -06:00
srq.h
trace.c
trace.h
trace_cq.h
trace_mr.h
trace_qp.h
trace_rc.h
trace_rvt.h
trace_tx.h IB/{hfi1, qib, rdmavt}: Move send completion logic to rdmavt 2018-10-03 16:38:28 -06:00
vt.c RDMA: Start use ib_device_ops 2018-12-12 07:40:16 -07:00
vt.h