linux_dsm_epyc7002/drivers/infiniband/hw/hfi1
Jianxin Xiong 4dfe7cceb2 IB/hfi1: Fix a potential memory leak in hfi1_create_ctxts()
In the function hfi1_create_ctxts the array "dd->rcd" is allocated and
then populated with allocated resources in a loop. Previously, if
error happened during the loop, only resource allocated in the current
iteration would be freed. The array itself would then be freed, leaving
the resources that were allocated in previous iterations and referenced
by the array elements in limbo.

This patch makes sure all allocated resources are freed before freeing
the array "dd->rcd". Also the resource allocation now takes account of
the numa node the device is attached to.

Reviewed-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-11-15 16:16:42 -05:00
..
affinity.c IB/hfi1: Remove redundant sysfs irq affinity entry 2016-11-15 16:16:40 -05:00
affinity.h IB/hfi1: Remove redundant sysfs irq affinity entry 2016-11-15 16:16:40 -05:00
aspm.h
chip_registers.h
chip.c IB/hfi1: Fix an Oops on pci device force remove 2016-11-15 16:16:41 -05:00
chip.h IB/hfi1: Adjust hardware buffering parameter 2016-10-02 08:42:15 -04:00
common.h IB/qib,IB/hfi: Use core common header file 2016-10-02 08:42:06 -04:00
debugfs.c IB/hfi1: Add new debugfs sdma_cpu_list file 2016-10-02 08:42:19 -04:00
debugfs.h
device.c
device.h
dma.c
driver.c IB/qib,IB/hfi: Use core common header file 2016-10-02 08:42:06 -04:00
efivar.c
efivar.h
eprom.c IB/hfi1: Add ability to read platform config from the EPROM 2016-10-02 08:42:20 -04:00
eprom.h IB/hfi1: Add ability to read platform config from the EPROM 2016-10-02 08:42:20 -04:00
file_ops.c IB/hfi1: Fix an Oops on pci device force remove 2016-11-15 16:16:41 -05:00
firmware.c
hfi.h IB/hfi1: Fix an Oops on pci device force remove 2016-11-15 16:16:41 -05:00
init.c IB/hfi1: Fix a potential memory leak in hfi1_create_ctxts() 2016-11-15 16:16:42 -05:00
intr.c
iowait.h
Kconfig Second round of merge items for 4.8 2016-08-04 20:26:31 -04:00
mad.c IB/hfi1: Remove filtering of Set(PkeyTable) in HFI SMA 2016-10-02 08:42:12 -04:00
mad.h
Makefile
mmu_rb.c IB/hfi1: Add cache evict LRU list 2016-08-02 22:46:21 -04:00
mmu_rb.h
opa_compat.h
pcie.c
pio_copy.c IB/hfi1: Combine shift copy and byte copy for SGE reads 2016-10-02 08:42:14 -04:00
pio.c IB/hfi1: Fix integrity check flags default values 2016-11-15 16:16:41 -05:00
pio.h IB/hfi1: Fix user-space buffers mapping with IOMMU enabled 2016-10-02 08:42:07 -04:00
platform.c IB/hfi1: Use EPROM platform configuration read 2016-10-02 08:42:20 -04:00
platform.h
qp.c IB/rdmavt, IB/hfi1: Add lockdep asserts for lock debug 2016-10-02 08:42:10 -04:00
qp.h
qsfp.c IB/hfi1: Extend i2c timeout 2016-10-02 08:42:13 -04:00
qsfp.h IB/hfi1: Fetch monitor values on-demand for CableInfo query 2016-08-22 14:31:41 -04:00
rc.c IB/hfi1: Cleanup tasklet refs in comments 2016-10-02 08:42:16 -04:00
ruc.c IB/hfi1: Cleanup tasklet refs in comments 2016-10-02 08:42:16 -04:00
sdma_txreq.h
sdma.c IB/hfi1: Fix integrity check flags default values 2016-11-15 16:16:41 -05:00
sdma.h IB/hfi1: Add new debugfs sdma_cpu_list file 2016-10-02 08:42:19 -04:00
sysfs.c IB/hfi1: Remove redundant sysfs irq affinity entry 2016-11-15 16:16:40 -05:00
trace_ctxts.h IB/hfi1: Fix user-space buffers mapping with IOMMU enabled 2016-10-02 08:42:07 -04:00
trace_dbg.h
trace_ibhdrs.h IB/qib,IB/hfi: Use core common header file 2016-10-02 08:42:06 -04:00
trace_misc.h
trace_rc.h
trace_rx.h IB/qib,IB/hfi: Use core common header file 2016-10-02 08:42:06 -04:00
trace_tx.h
trace.c IB/hfi1: Fix trace of atomic ack 2016-10-02 08:42:21 -04:00
trace.h
uc.c IB/hfi1: Consolidate pio control masks into single definition 2016-10-02 08:42:11 -04:00
ud.c IB/hfi1: Update SMA ingress checks for response packets 2016-10-02 08:42:21 -04:00
user_exp_rcv.c
user_exp_rcv.h
user_pages.c
user_sdma.c IB/hfi1: Add sysfs interface for affinity setup 2016-10-02 08:42:17 -04:00
user_sdma.h
verbs_txreq.c IB/rdmavt, IB/qib, IB/hfi1: Use new QP put get routines 2016-09-16 14:35:27 -04:00
verbs_txreq.h
verbs.c Merge of primary rdma-core code for 4.9 2016-10-09 17:04:33 -07:00
verbs.h IB/hfi1: Consolidate pio control masks into single definition 2016-10-02 08:42:11 -04:00