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 IB/qib: Begin to use rdmavt for verbs 2016-03-10 20:37:15 -05:00
Makefile IB/qib: Remove srq functionality 2016-03-10 20:37:33 -05:00
qib_6120_regs.h
qib_7220_regs.h
qib_7220.h IB/qib: Eliminate 64-bit jiffies use 2012-01-03 20:52:12 -08:00
qib_7322_regs.h IB/qib: Mask hardware error during link reset 2010-07-06 14:13:20 -07:00
qib_common.h IB/hfi1, qib, rdmavt: Move AETH credit functions into rdmavt 2017-02-19 09:18:38 -05:00
qib_debugfs.c IB/hfi1,IB/qib: Fix qp_stats sleep with rcu read lock held 2016-08-22 14:31:34 -04:00
qib_debugfs.h IB/qib: Convert opcode counters to per-context 2013-06-21 17:19:50 -07:00
qib_diag.c IB/qib: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
qib_driver.c IB/qib: Use standard refcount wrapper for QPs 2016-12-11 15:29:42 -05:00
qib_eeprom.c IB/qib: Remove debug prints after allocation failure 2016-12-03 13:12:52 -05:00
qib_file_ops.c mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmf 2017-02-24 17:46:54 -08:00
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 IB/qib: Begin to use rdmavt for verbs 2016-03-10 20:37:15 -05:00
qib_keys.c IB/qib: Remove DMA mapping code 2017-01-24 12:23:35 -05:00
qib_mad.c IB/core: Use rdma_ah_attr accessor functions 2017-05-01 14:32:43 -04:00
qib_mad.h IB/core: Add core header changes needed for OPA 2015-08-28 22:54:50 -04:00
qib_pcie.c RDMA/qib: drop qib_pci_link_reset() 2017-01-12 11:38:41 -05:00
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 IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
qib_qsfp.h IB/qib: Remove empty function 2017-01-24 16:20:37 -05:00
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 IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_sdma.c IB/qib: Remove modify queue pair code 2016-03-10 20:37:34 -05:00
qib_sysfs.c IB/qib: Remove ibport and use rdmavt version 2016-03-10 20:37:21 -05:00
qib_twsi.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
qib_tx.c IB/qib: Add blank line after declaration 2015-02-20 09:04:12 -08:00
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 RDMA/qib: use rb_entry() 2017-01-12 11:38:41 -05:00
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 IB/qib: fix test of unsigned variable 2015-05-12 13:55:41 -04:00
qib.h IB/qib: Remove qpt_mask global 2016-10-02 08:42:11 -04:00