linux-stable/drivers/dma
Lars-Peter Clausen 50db2050fa dmaengine: xilinx: Introduce synchronize() callback
The Xilinx dmaengine driver uses a tasklet to process completed
descriptors and execute their callbacks.

Currently consumers of the DMA channel have to no method of synchronization
against this tasklet when using the Xilinx dmaengine drivers. This can lead
to race conditions when the consumer frees resources that are accessed in
the callback before the tasklet has finished running.

It is not enough to just call dmaengine_terminal_all() since on a
multi-processor system the tasklet can run concurrently to it and might
call the callback after dmaengine_terminate_all() has already finished.

To mitigate this issue implement the synchronize() callback for the driver,
which will wait until the tasklet has finished.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20210313125311.4823-1-lars@metafoo.de
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2021-03-16 16:15:32 +05:30
..
bestcomm
dw dmaengine dw: Revert "dmaengine: dw: Enable runtime PM" 2021-02-08 17:36:12 +05:30
dw-axi-dmac dmaengine: dw-axi-dmac: remove redundant null check on desc 2021-02-08 17:39:39 +05:30
dw-edma dmaengine: dw-edma: Fix use after free in dw_edma_alloc_chunk() 2020-12-29 10:08:00 +05:30
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: remove set but not used variable 'dpaa2_qdma' 2020-03-06 19:04:55 +05:30
hsu dmaengine: hsu: disable spurious interrupt 2021-01-13 22:01:34 +05:30
idxd dmaengine updates for v5.12-rc1 2021-02-23 15:05:10 -08:00
ioat dmaengine: ioatdma: remove unused function missed during dma_v2 removal 2020-11-16 22:42:28 +05:30
ipu dmaengine: ipu_idmac: remove redundant irqsave and restore in hardIRQ 2020-11-09 17:25:53 +05:30
lgm dmaengine: INTEL_LDMA should depend on X86 2021-02-01 11:27:14 +05:30
mediatek dmaengine: mediatek: mtk-hsdma: Fix a resource leak in the error handling path of the probe function 2020-12-29 10:07:59 +05:30
ppc4xx dmaengine: ppc4xx: remove xor_hw_desc assignment without reading 2020-10-30 14:10:27 +05:30
qcom dmaengine updates for v5.12-rc1 2021-02-23 15:05:10 -08:00
sf-pdma dmaengine: sf: drop of_match_ptr from of_device_id table 2020-11-24 23:02:20 +05:30
sh dmaengine: rcar-dmac: Add support for R-Car V3U 2021-02-01 11:18:59 +05:30
ti dmaengine updates for v5.12-rc1 2021-02-23 15:05:10 -08:00
xilinx dmaengine: xilinx: Introduce synchronize() callback 2021-03-16 16:15:32 +05:30
acpi-dma.c dmaengine: acpi: Put the CSRT table after using it 2020-08-17 10:21:37 +05:30
altera-msgdma.c dmaengine: altera-msgdma: fix kernel-doc style for tasklet 2020-10-08 15:18:37 +05:30
amba-pl08x.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
at_hdmac.c dmaengine: at_hdmac: remove platform data header 2021-01-08 13:57:19 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: remove platform data header 2021-01-08 13:57:19 +05:30
at_xdmac.c dmaengine: at_xdmac: add AXI priority support and recommended settings 2020-10-30 14:10:27 +05:30
bcm-sba-raid.c dmaengine: bcm-sba-raid: Replace zero-length array with flexible-array member 2020-02-13 20:15:35 +05:30
bcm2835-dma.c dmaengine: bcm2835: Drop local dma_parms 2020-09-11 17:42:12 +05:30
dma-axi-dmac.c dmaengine: axi-dmac: Drop local dma_parms 2020-09-11 17:42:12 +05:30
dma-jz4780.c dmaengine: jz4780: Add support for the JZ4760(B) 2021-01-26 22:45:22 +05:30
dmaengine.c dmaengine: move channel device_node deletion to driver 2021-01-19 22:10:52 +05:30
dmaengine.h dmaengine: Create debug directories for DMA devices 2020-03-11 14:56:14 +05:30
dmatest.c dmaengine: dmatest: Use dmaengine_get_dma_device 2020-12-11 21:20:08 +05:30
ep93xx_dma.c dmaengine: ep93xx: convert tasklets to use new tasklet_setup() API 2020-09-18 12:18:11 +05:30
fsl-edma-common.c dmaengine: fsl-edma: fix wrong tcd endianness for big-endian cpu 2020-07-06 14:49:22 +05:30
fsl-edma-common.h dmaengine: fsl-edma-common: correct DSIZE_32BYTE 2020-07-06 10:24:49 +05:30
fsl-edma.c dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler 2020-06-24 13:05:01 +05:30
fsl-qdma.c dmaengine: Extend NXP QDMA driver to check transmission errors 2020-07-17 11:50:03 +05:30
fsl_raid.c dmaengine: fsl: remove bad channel update 2020-10-05 09:59:17 +05:30
fsl_raid.h
fsldma.c dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function 2021-01-12 18:00:39 +05:30
fsldma.h fsldma: fix very broken 32-bit ppc ioread64 functionality 2020-08-29 13:50:56 -07:00
hisi_dma.c dmaengine: hisi_dma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
idma64.c dmaengine: idma64: Switch to use __maybe_unused instead of ifdeffery 2020-11-09 17:21:05 +05:30
idma64.h
img-mdc-dma.c
imx-dma.c dmaengine: imx-dma: Remove unused .id_table 2020-11-24 22:55:07 +05:30
imx-sdma.c dmaengine: imx-sdma: Use of_device_get_match_data() 2021-01-26 22:42:48 +05:30
iop-adma.c Merge branch 'topic/tasklet' into next 2020-10-01 10:18:59 +05:30
iop-adma.h treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
k3dma.c dmaengine: k3dma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
Kconfig dmaengine: drivers: Kconfig: add HAS_IOMEM dependency to DW_AXI_DMAC 2021-02-01 15:08:15 +05:30
lpc18xx-dmamux.c
Makefile dmaengine: remove coh901318 driver 2021-01-26 22:55:32 +05:30
mcf-edma.c dmaengine: mcf-edma: Fix NULL pointer exception in mcf_edma_tx_handler 2020-06-24 13:06:15 +05:30
milbeaut-hdmac.c dmaengine: Replace zero-length array with flexible-array 2020-06-15 23:08:30 -05:00
milbeaut-xdmac.c dmaengine: milbeaut-xdmac: Fix a resource leak in the error handling path of the probe function 2020-12-29 10:08:00 +05:30
mmp_pdma.c dmaengine: mmp_pdma: Remove mmp_pdma_filter_fn() 2021-01-26 22:58:01 +05:30
mmp_tdma.c dmaengine: mmp: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
moxart-dma.c dmaengine: moxart-dma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
mpc512x_dma.c dmaengine: mpc512x: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
mv_xor.c dmaengine: mv_xor: drop of_match_ptr from of_device_id table 2020-11-24 23:02:20 +05:30
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Fix error return code in mv_xor_v2_probe() 2020-11-24 22:55:15 +05:30
mxs-dma.c dmaengine: mxs-dma: Remove the unused .id_table 2020-11-24 22:55:15 +05:30
nbpfaxi.c dmaengine: nbpfaxi: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
of-dma.c dmaengine: of-dma: Add support for optional router configuration callback 2020-12-11 21:20:08 +05:30
owl-dma.c dmaengine: owl-dma: Fix a resource leak in the remove function 2021-01-12 18:00:40 +05:30
pch_dma.c dmaengine: pch_dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:06 +05:30
pl330.c amba: Make the remove callback return void 2021-02-02 14:25:50 +01:00
plx_dma.c dmaengine: plx_dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
pxa_dma.c dmaengine: pxa_dma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
s3c24xx-dma.c dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" 2020-01-23 17:03:25 +05:30
sa11x0-dma.c dmaengine: sa11x0: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
sprd-dma.c dmaengine: sprd: Set request pending flag when DMA controller is active 2020-03-23 11:38:24 +05:30
st_fdma.c iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
st_fdma.h
ste_dma40.c dmaengine: stedma40: fix 'physical' typo 2021-01-27 21:13:19 +05:30
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: take address into account when computing max width 2020-12-11 21:13:08 +05:30
stm32-dmamux.c dmaengine: stm32: mark of_device_id table as maybe unused 2020-11-24 23:02:20 +05:30
stm32-mdma.c dmaengine: stm32-mdma: fix STM32_MDMA_VERY_HIGH_PRIORITY value 2021-01-04 21:27:45 +05:30
sun4i-dma.c dmaengine: sun4i-dma: Demote obvious misuse of kerneldoc to standard comment blocks 2020-07-15 17:50:47 +05:30
sun6i-dma.c dmaengine: sun6i: Add support for A100 DMA 2020-11-18 16:28:49 +05:30
tegra20-apb-dma.c dmaengine: tegra20: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
tegra210-adma.c dmaengine: tegra210-adma: remove redundant irqsave and irqrestore in hardIRQ 2020-11-09 17:25:54 +05:30
timb_dma.c dmaengine: timb_dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
TODO
txx9dmac.c dmaengine: txx9dmac: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
txx9dmac.h
uniphier-mdmac.c dmaengine: uniphier-mdmac: replace zero-length array with flexible-array member 2020-02-13 20:15:57 +05:30
uniphier-xdmac.c iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
virt-dma.c dmaengine: virt-dma: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30
virt-dma.h dmaengine: virt-dma: Add missing locking around list operations 2019-12-26 10:04:18 +05:30
xgene-dma.c dmaengine: xgene: convert tasklets to use new tasklet_setup() API 2020-09-18 12:19:07 +05:30