remarkable-linux/drivers/infiniband/hw/hfi1
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
..
affinity.c sched/core: Remove the tsk_cpus_allowed() wrapper 2017-03-02 08:42:24 +01:00
affinity.h
aspm.h IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
chip.c RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
chip.h IB/hfi1: Clean up context initialization 2017-05-04 19:31:46 -04:00
chip_registers.h RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
common.h IB/hfi1: Use defines from common headers 2017-04-28 13:48:01 -04:00
debugfs.c IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
debugfs.h IB/hfi1: Add transmit fault injection feature 2017-04-05 14:45:09 -04:00
device.c infiniband: utilize the new cdev_set_parent function 2017-03-21 06:44:33 +01:00
device.h
driver.c IB/hfi1: Fix an assign/ordering issue with shared context IDs 2017-05-04 19:31:46 -04:00
efivar.c IB/hfi1: Check upper-case EFI variables 2017-02-19 09:18:37 -05:00
efivar.h
eprom.c
eprom.h
file_ops.c IB/hfi1: Clean up on context initialization failure 2017-05-04 19:31:46 -04:00
firmware.c IB/hfi1: Add a patch value to the firmware version string 2017-04-05 14:45:09 -04:00
hfi.h RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
init.c IB/hfi1: Clean up on context initialization failure 2017-05-04 19:31:46 -04:00
intr.c RDMA/hfi1: Defer setting VL15 credits to link-up interrupt 2017-06-01 17:04:20 -04:00
iowait.h
Kconfig
mad.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
mad.h
Makefile IB/hfi1: VNIC SDMA support 2017-04-20 15:19:41 -04:00
mmu_rb.c
mmu_rb.h
opa_compat.h
pcie.c RDMA/hfi1: change PCI bar addr assignments to Linux API functions 2017-06-01 17:03:40 -04:00
pio.c IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
pio.h IB/hfi: Fix up comments in engine mapping 2017-04-25 15:24:51 -04:00
pio_copy.c
platform.c
platform.h
qp.c IB/hfi1, IB/rdmavt: Move r_adefered to r_lock cache line 2017-05-04 19:31:46 -04:00
qp.h IB/hfi1, qib, rdmavt: Move AETH credit functions into rdmavt 2017-02-19 09:18:38 -05:00
qsfp.c
qsfp.h
rc.c RDMA/qib,hfi1: Fix MR reference count leak on write with immediate 2017-06-01 17:04:33 -04:00
ruc.c IB/hfi1: Fix yield logic in send engine 2017-05-04 19:31:46 -04:00
sdma.c IB/hfi1: Ensure VL index is within bounds 2017-04-05 14:45:09 -04:00
sdma.h IB/hfi: Fix up comments in engine mapping 2017-04-25 15:24:51 -04:00
sdma_txreq.h
sysfs.c RDMA/hfi1: fix array termination by appending NULL to attr array 2017-06-01 17:03:19 -04:00
trace.c IB/hfi1: Add functions to parse 9B headers 2017-04-28 13:48:01 -04:00
trace.h
trace_ctxts.h IB/hfi1: Clean up context initialization 2017-05-04 19:31:46 -04:00
trace_dbg.h
trace_ibhdrs.h IB/hfi1: Use defines from common headers 2017-04-28 13:48:01 -04:00
trace_misc.h IB/hfi1: Add receive fault injection feature 2017-04-05 14:45:09 -04:00
trace_rc.h IB/rdmavt, IB/hfi1: Fix timer migration regressions 2017-04-05 14:45:09 -04:00
trace_rx.h
trace_tx.h IB/hfi1: Fix yield logic in send engine 2017-05-04 19:31:46 -04:00
uc.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
ud.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
user_exp_rcv.c IB/hfi1: Clean up on context initialization failure 2017-05-04 19:31:46 -04:00
user_exp_rcv.h IB/hfi1: Clean up context initialization 2017-05-04 19:31:46 -04:00
user_pages.c IB/hfi1: Virtual Network Interface Controller (VNIC) HW support 2017-04-20 15:19:35 -04:00
user_sdma.c IB/hfi1: Clean up on context initialization failure 2017-05-04 19:31:46 -04:00
user_sdma.h IB/hfi1: Fix an assign/ordering issue with shared context IDs 2017-05-04 19:31:46 -04:00
verbs.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
verbs.h IB/hfi1: Fix yield logic in send engine 2017-05-04 19:31:46 -04:00
verbs_txreq.c
verbs_txreq.h
vnic.h IB/hfi1: VNIC SDMA support 2017-04-20 15:19:41 -04:00
vnic_main.c IB/hfi1: Clean up context initialization 2017-05-04 19:31:46 -04:00
vnic_sdma.c IB/hfi1: VNIC SDMA support 2017-04-20 15:19:41 -04:00