linux/drivers/dma
Kees Cook be4d46edee dmaengine: dw-axi-dmac: Do not dereference NULL structure
If "vdesc" is NULL, it cannot be used with vd_to_axi_desc(). Leave
"bytes" unchanged at 0. Seen under GCC 13 with -Warray-bounds:

../drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c: In function 'dma_chan_tx_status':
../drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c:329:46: warning: array subscript 0 is outside array bounds of 'struct
virt_dma_desc[46116860184273879]' [-Warray-bounds=]
  329 |                 bytes = vd_to_axi_desc(vdesc)->length;
      |                                              ^~

Fixes: 8e55444da6 ("dmaengine: dw-axi-dmac: Support burst residue granularity")
Cc: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Cc: Vinod Koul <vkoul@kernel.org>
Cc: dmaengine@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230127223623.never.507-kees@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2023-02-16 18:45:48 +05:30
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_56.RULE (part 2) 2022-06-10 14:51:35 +02:00
dw dmaengine updates for v6.0-rc1 2022-08-04 18:44:38 -07:00
dw-axi-dmac dmaengine: dw-axi-dmac: Do not dereference NULL structure 2023-02-16 18:45:48 +05:30
dw-edma dmaengine: dw-edma: Remove runtime PM support 2022-09-29 22:46:08 +05:30
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: Drop comma after SoC match table sentinel 2022-03-11 15:47:39 +05:30
hsu dmaengine: hsu: Include headers we are direct user of 2022-09-04 22:49:35 +05:30
idxd dmaengine: idxd: Fix default allowed read buffers value in group 2023-02-16 18:45:48 +05:30
ioat dmaengine: ioat: Fix spelling mistake "idel" -> "idle" 2022-10-19 18:56:57 +05:30
ipu
lgm dmaengine: lgm: Fix an error handling path in intel_ldma_probe() 2022-07-06 10:53:25 +05:30
mediatek dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
ppc4xx dmaengine: ppc4xx: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2023-01-18 17:43:47 +05:30
ptdma dmaengine: ptdma: statify pt_tx_status 2022-04-22 11:29:13 +05:30
qcom dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
sf-pdma dmaengine: sf-pdma: pdma_desc memory leak fix 2023-02-16 18:45:48 +05:30
sh dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
ti dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
xilinx dmaengine: xilinx: xdma: Add user logic interrupt support 2023-02-10 11:32:26 +05:30
acpi-dma.c
altera-msgdma.c dmaengine: altera-msgdma: Fixed some inconsistent function name descriptions 2022-07-06 22:00:06 +05:30
amba-pl08x.c dmaengine: pl08x: Fix double word 2022-09-29 12:24:16 +05:30
apple-admac.c Merge branch 'fixes' into next 2022-11-11 12:14:26 +05:30
at_hdmac.c dmaengine: at_hdmac: Convert driver to use virt-dma 2022-11-11 12:15:09 +05:30
at_xdmac.c dmaengine: at_xdmac: remove empty line 2023-01-18 22:14:22 +05:30
bcm2835-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
bcm-sba-raid.c treewide: Replace GPLv2 boilerplate/reference with SPDX - gpl-2.0_30.RULE (part 2) 2022-06-10 14:51:35 +02:00
dma-axi-dmac.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
dma-jz4780.c dmaengine: JZ4780: Add support for the JZ4755. 2022-10-19 19:13:16 +05:30
dmaengine.c dmaengine: Simplify dmaenginem_async_device_register() function 2023-02-10 11:37:45 +05:30
dmaengine.h
dmatest.c treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
ep93xx_dma.c dmaengine: ep93xx: Fix typo in comments 2022-07-01 21:50:23 +05:30
fsl_raid.c
fsl_raid.h
fsl-edma-common.c dmaengine: fsl-edma: remove redundant assignment to pointer last_sg 2022-07-01 22:09:16 +05:30
fsl-edma-common.h
fsl-edma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
fsl-qdma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
fsldma.c
fsldma.h
hisi_dma.c dmaengine: hisilicon: Dump regs to debugfs 2022-09-04 22:42:35 +05:30
idma64.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
idma64.h
img-mdc-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
imx-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
imx-sdma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
k3dma.c
Kconfig dmaengine: xilinx: xdma: Add xilinx xdma driver 2023-02-10 11:32:26 +05:30
lpc18xx-dmamux.c
Makefile dmaengine: Revert "dmaengine: remove s3c24xx driver" 2022-12-02 17:11:50 +05:30
mcf-edma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
milbeaut-hdmac.c
milbeaut-xdmac.c
mmp_pdma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
mmp_tdma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
moxart-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
mpc512x_dma.c
mv_xor_v2.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
mv_xor.c
mv_xor.h
mxs-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
nbpfaxi.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
of-dma.c
owl-dma.c dmaengine: owl: fix typo in comment 2022-07-06 10:50:43 +05:30
pch_dma.c dmaengine: pch_dma: Remove usage of the deprecated "pci-dma-compat.h" API 2022-01-08 22:16:44 +05:30
pl330.c dmaengine: pl330: Remove unused flags 2022-09-05 12:01:54 +05:30
plx_dma.c dmaengine: plx_dma: Move spin_lock_bh() to spin_lock() 2022-04-20 15:59:33 +05:30
pxa_dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
s3c24xx-dma.c dmaengine: Revert "dmaengine: remove s3c24xx driver" 2022-12-02 17:11:50 +05:30
sa11x0-dma.c
sprd-dma.c dmaengine: sprd: Cleanup in .remove() after pm_runtime_get_sync() failed 2022-07-26 18:20:49 +05:30
st_fdma.c
st_fdma.h
ste_dma40_ll.c
ste_dma40_ll.h
ste_dma40.c dmaengine: ste_dma40: fix typo in comment 2022-07-06 10:54:08 +05:30
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: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
stm32-mdma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
sun4i-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
sun6i-dma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
tegra20-apb-dma.c
tegra186-gpc-dma.c dmaengine: tegra: Add support for dma-channel-mask 2022-11-14 04:01:12 +05:30
tegra210-adma.c dmaengine: drivers: Use devm_platform_ioremap_resource() 2023-01-18 22:16:47 +05:30
timb_dma.c
TODO
txx9dmac.c
txx9dmac.h
uniphier-mdmac.c
uniphier-xdmac.c dmaengine: uniphier-xdmac: Fix type of address variables 2022-01-03 17:49:37 +05:30
virt-dma.c
virt-dma.h
xgene-dma.c