linux-stable/drivers/dma
Martin Povišer b7abd53588 dmaengine: apple-admac: Fix 'current_tx' not getting freed
[ Upstream commit d9503be5a1 ]

In terminate_all we should queue up all submitted descriptors to be
freed. We do that for the content of the 'issued' and 'submitted' lists,
but the 'current_tx' descriptor falls through the cracks as it's
removed from the 'issued' list once it gets assigned to be the current
descriptor. Explicitly queue up freeing of the 'current_tx' descriptor
to address a memory leak that is otherwise present.

Fixes: b127315d9a ("dmaengine: apple-admac: Add Apple ADMAC driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20230224152222.26732-2-povik+lin@cutebit.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-20 12:35:08 +02:00
..
bestcomm
dw
dw-axi-dmac dmaengine: dw-axi-dmac: Do not dereference NULL structure 2023-03-10 09:33:39 +01:00
dw-edma dmaengine: dw-edma: Fix readq_ch() return value truncation 2023-03-10 09:33:38 +01:00
fsl-dpaa2-qdma
hsu dmaengine: hsu: Include headers we are direct user of 2022-09-04 22:49:35 +05:30
idxd dmaengine: idxd: Set traffic class values in GRPCFG on DSA 2.0 2023-03-10 09:33:28 +01:00
ioat dmaengine: ioat: remove unused declarations in dma.h 2022-09-29 22:46:09 +05:30
ipu
lgm dmaengine: lgm: Move DT parsing after initialization 2023-01-24 07:24:39 +01:00
mediatek
ppc4xx
ptdma dmaengine: ptdma: check for null desc before calling pt_cmd_callback 2023-03-10 09:33:39 +01:00
qcom dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation 2023-02-01 08:34:02 +01:00
sf-pdma dmaengine: sf-pdma: pdma_desc memory leak fix 2023-03-10 09:33:39 +01:00
sh dmaengine: sh: rcar-dmac: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper 2022-09-29 21:14:32 +05:30
ti dmaengine: ti: k3-udma: Do conditional decrement of UDMA_CHAN_RT_PEER_BCNT_REG 2023-02-01 08:34:02 +01:00
xilinx dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node() 2023-02-01 08:34:24 +01:00
acpi-dma.c
altera-msgdma.c
amba-pl08x.c dmaengine: pl08x: Fix double word 2022-09-29 12:24:16 +05:30
apple-admac.c dmaengine: apple-admac: Fix 'current_tx' not getting freed 2023-04-20 12:35:08 +02:00
at_hdmac.c dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-08 10:43:57 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: Fix at_lli struct definition 2022-11-08 10:43:56 +05:30
at_xdmac.c dmaengine: at_xdmac: Replace two if statements with only one with two conditions 2022-09-05 12:01:55 +05:30
bcm-sba-raid.c
bcm2835-dma.c
dma-axi-dmac.c
dma-jz4780.c
dmaengine.c dmaengine: Fix double increment of client_count in dma_chan_get() 2023-02-01 08:34:23 +01:00
dmaengine.h
dmatest.c treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
ep93xx_dma.c
fsl-edma-common.c
fsl-edma-common.h
fsl-edma.c
fsl-qdma.c
fsl_raid.c
fsl_raid.h
fsldma.c
fsldma.h
hisi_dma.c dmaengine: hisilicon: Dump regs to debugfs 2022-09-04 22:42:35 +05:30
idma64.c
idma64.h
img-mdc-dma.c
imx-dma.c
imx-sdma.c dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init 2023-02-06 08:06:33 +01:00
iop-adma.c
iop-adma.h
k3dma.c
Kconfig dmaengine: HISI_DMA should depend on ARCH_HISI 2023-03-10 09:33:28 +01:00
lpc18xx-dmamux.c
Makefile
mcf-edma.c
milbeaut-hdmac.c
milbeaut-xdmac.c
mmp_pdma.c
mmp_tdma.c
moxart-dma.c
mpc512x_dma.c
mv_xor.c
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove() 2022-11-08 10:43:56 +05:30
mxs-dma.c dmaengine: mxs: use platform_driver_register 2022-09-29 12:05:20 +05:30
nbpfaxi.c
of-dma.c
owl-dma.c
pch_dma.c
pl330.c dmaengine: pl330: Remove unused flags 2022-09-05 12:01:54 +05:30
plx_dma.c
pxa_dma.c dmaengine: pxa_dma: use platform_get_irq_optional 2022-11-08 10:42:51 +05:30
s3c24xx-dma.c dmaengine: virt-dma: Fix double word in comments 2022-09-29 12:22:27 +05:30
sa11x0-dma.c
sprd-dma.c
st_fdma.c
st_fdma.h
ste_dma40.c
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: fix potential race between pause and resume 2022-11-08 10:43:56 +05:30
stm32-dmamux.c dmaengine: stm32-dmamux: Simplify code and save a few bytes of memory 2022-09-05 11:52:28 +05:30
stm32-mdma.c dmaengine: stm32-mdma: memset stm32_mdma_chan_config struct before using it 2022-10-19 19:01:19 +05:30
sun4i-dma.c
sun6i-dma.c
tegra20-apb-dma.c
tegra186-gpc-dma.c dmaengine: tegra: Fix memory leak in terminate_all() 2023-02-01 08:34:24 +01:00
tegra210-adma.c dmaengine: tegra210-adma: fix global intr clear 2023-01-24 07:24:39 +01:00
timb_dma.c
TODO
txx9dmac.c
txx9dmac.h
uniphier-mdmac.c
uniphier-xdmac.c
virt-dma.c
virt-dma.h
xgene-dma.c