kernel_samsung_a53x/drivers/infiniband/hw/hfi1
Zhipeng Lu 0a993be38c IB/hfi1: Fix a memleak in init_credit_return
[ Upstream commit 809aa64ebff51eb170ee31a95f83b2d21efa32e2 ]

When dma_alloc_coherent fails to allocate dd->cr_base[i].va,
init_credit_return should deallocate dd->cr_base and
dd->cr_base[i] that allocated before. Or those resources
would be never freed and a memleak is triggered.

Fixes: 7724105686e7 ("IB/hfi1: add driver files")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Link: https://lore.kernel.org/r/20240112085523.3731720-1-alexious@zju.edu.cn
Acked-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 22:25:39 +01:00
..
affinity.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
affinity.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
aspm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chip.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chip.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
chip_registers.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debugfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
driver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efivar.c RDMA/hfi1: Workaround truncation compilation error 2024-11-18 11:43:04 +01:00
efivar.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eprom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
eprom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exp_rcv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exp_rcv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fault.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fault.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
file_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
firmware.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hfi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
init.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iowait.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iowait.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipoib.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipoib_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipoib_rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ipoib_tx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mad.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu_rb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mmu_rb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
msix.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netdev.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netdev_rx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opa_compat.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opfn.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
opfn.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie.c RDMA/hfi1: Use FIELD_GET() to extract Link Width 2024-11-18 11:43:13 +01:00
pio.c IB/hfi1: Fix a memleak in init_credit_return 2024-11-18 22:25:39 +01:00
pio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pio_copy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qsfp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
qsfp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ruc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdma.c IB/hfi1: Fix sdma.h tx->num_descs off-by-one error 2024-11-18 22:25:37 +01:00
sdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sdma_txreq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sysfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tid_rdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tid_rdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_ctxts.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_dbg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_ibhdrs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_iowait.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_misc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_mmu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_rc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_rx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_tid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_tx.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ud.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_exp_rcv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_exp_rcv.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_pages.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_sdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
user_sdma.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verbs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verbs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verbs_txreq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
verbs_txreq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vnic.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vnic_main.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vnic_sdma.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00