diff options
| author | Geert Uytterhoeven <[email protected]> | 2014-08-06 12:58:58 +0000 |
|---|---|---|
| committer | Mark Brown <[email protected]> | 2014-08-16 22:13:53 +0000 |
| commit | 3819bc8752367eae0d72fa1c473dc88ea45631a7 (patch) | |
| tree | c3276922453c341ebe0ca35cf48f2d3c959d7bf2 /drivers/net/xen-netback/interface.c | |
| parent | Linux 3.17-rc1 (diff) | |
| download | kernel-3819bc8752367eae0d72fa1c473dc88ea45631a7.tar.gz kernel-3819bc8752367eae0d72fa1c473dc88ea45631a7.zip | |
spi: rspi: Fix leaking of unused DMA descriptors
If dmaengine_prep_slave_sg() or dmaengine_submit() fail, we may leak
unused DMA descriptors.
As per Documentation/dmaengine.txt, once a DMA descriptor has been
obtained, it must be submitted. Hence:
- First prepare and submit all DMA descriptors,
- Prepare the SPI controller for DMA,
- Start DMA by calling dma_async_issue_pending(),
- Make sure to call dmaengine_terminate_all() on all descriptors that
haven't completed.
Reported-by: Laurent Pinchart <[email protected]>
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions
