linux/drivers/infiniband/hw
Mike Marciniszyn 1feb40067c RDMA/qib,hfi1: Fix MR reference count leak on write with immediate
The handling of IB_RDMA_WRITE_ONLY_WITH_IMMEDIATE will leak a memory
reference when a buffer cannot be allocated for returning the immediate
data.

The issue is that the rkey validation has already occurred and the RNR
nak fails to release the reference that was fruitlessly gotten.  The
the peer will send the identical single packet request when its RNR
timer pops.

The fix is to release the held reference prior to the rnr nak exit.
This is the only sequence the requires both rkey validation and the
buffer allocation on the same packet.

Cc: Stable <stable@vger.kernel.org> # 4.7+
Tested-by: Tadeusz Struk <tadeusz.struk@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2017-06-01 17:04:33 -04:00
..
bnxt_re IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
cxgb3 IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
cxgb4 RDMA/iw_cxgb4: fix the calculation of ipv6 header size 2017-06-01 17:03:02 -04:00
hfi1 RDMA/qib,hfi1: Fix MR reference count leak on write with immediate 2017-06-01 17:04:33 -04:00
hns scripts/spelling.txt: add regsiter -> register spelling mistake 2017-05-08 17:15:13 -07:00
i40iw RDMA/i40iw: fix duplicated code for different branches 2017-06-01 17:00:29 -04:00
mlx4 IB/mlx4: Fix incorrect order of formal and actual parameters 2017-05-01 15:04:23 -04:00
mlx5 IB/mlx5: Enable IPoIB acceleration 2017-05-04 16:22:08 -04:00
mthca IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
nes RDMA/nes: ACK MPA Reply frame 2017-06-01 17:01:24 -04:00
ocrdma IB/ocrdma: fix out of bounds access to local buffer 2017-05-01 15:04:23 -04:00
qedr IOMMU Updates for Linux v4.12 2017-05-09 15:15:47 -07:00
qib RDMA/qib,hfi1: Fix MR reference count leak on write with immediate 2017-06-01 17:04:33 -04:00
usnic IB/core: Rename struct ib_ah_attr to rdma_ah_attr 2017-05-01 14:32:43 -04:00
vmw_pvrdma IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
Makefile RDMA/bnxt_re: Add bnxt_re driver build support 2017-02-14 09:51:28 -05:00