linux/drivers/infiniband/hw/qib
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
..
Kconfig
Makefile
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h
qib_7322_regs.h
qib_common.h
qib_debugfs.c
qib_debugfs.h
qib_diag.c
qib_driver.c
qib_eeprom.c
qib_file_ops.c
qib_fs.c fs: constify tree_descr arrays passed to simple_fill_super() 2017-04-26 23:54:06 -04:00
qib_iba6120.c IB/qib: use setup_timer 2017-04-28 13:19:14 -04:00
qib_iba7220.c IB/qib: use setup_timer 2017-04-28 13:19:14 -04:00
qib_iba7322.c IB/qib: use setup_timer 2017-04-28 13:19:14 -04:00
qib_init.c IB/qib: use setup_timer 2017-04-28 13:19:14 -04:00
qib_intr.c
qib_keys.c
qib_mad.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_mad.h
qib_pcie.c
qib_pio_copy.c
qib_qp.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_qsfp.c
qib_qsfp.h
qib_rc.c RDMA/qib,hfi1: Fix MR reference count leak on write with immediate 2017-06-01 17:04:33 -04:00
qib_ruc.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_sd7220.c
qib_sdma.c
qib_sysfs.c
qib_twsi.c
qib_tx.c
qib_uc.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_ud.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_user_pages.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/signal.h> 2017-03-02 08:42:29 +01:00
qib_user_sdma.c
qib_user_sdma.h
qib_verbs.c IB/core: Define 'ib' and 'roce' rdma_ah_attr types 2017-05-01 14:32:43 -04:00
qib_verbs.h IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_wc_ppc64.c
qib_wc_x86_64.c
qib.h