diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2019-06-24 14:38:18 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-06-25 06:38:22 +0200 |
commit | 78efb76ab4dfb8f74f290ae743f34162cd627f19 (patch) | |
tree | 7adc73ab2784f6c29cdb35e0380f561006bf166c /drivers/dma/fsl-edma-common.c | |
parent | dmaengine: dw: Enable iDMA 32-bit on Intel Elkhart Lake (diff) | |
download | linux-78efb76ab4dfb8f74f290ae743f34162cd627f19.tar.xz linux-78efb76ab4dfb8f74f290ae743f34162cd627f19.zip |
dmaengine: rcar-dmac: Reject zero-length slave DMA requests
While the .device_prep_slave_sg() callback rejects empty scatterlists,
it still accepts single-entry scatterlists with a zero-length segment.
These may happen if a driver calls dmaengine_prep_slave_single() with a
zero len parameter. The corresponding DMA request will never complete,
leading to messages like:
rcar-dmac e7300000.dma-controller: Channel Address Error happen
and DMA timeouts.
Although requesting a zero-length DMA request is a driver bug, rejecting
it early eases debugging. Note that the .device_prep_dma_memcpy()
callback already rejects requests to copy zero bytes.
Reported-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Analyzed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/fsl-edma-common.c')
0 files changed, 0 insertions, 0 deletions