mbox series

[v2,0/6] virt-dma and i.MX SDMA fixes

Message ID 20191210123352.7555-1-s.hauer@pengutronix.de (mailing list archive)
Headers show
Series virt-dma and i.MX SDMA fixes | expand

Message

Sascha Hauer Dec. 10, 2019, 12:33 p.m. UTC
The i.MX SDMA driver leaks memory when a currently running descriptor is
aborted. Calling vchan_terminate_vdesc() on it to fix this revealed that
the virt-dma support calls the desc_free with the spin_lock held. This
doesn't work for the SDMA driver because it calls dma_free_coherent in
its desc_free hook. This series aims to fix that up.

Changes since v1:
- rebase on v5.5-rc1
- Swap patches 1 and 2 for bisectablity
- Rename desc_aborted to desc_terminated
- Free up terminated descriptors immediately instead of letting them accumulate

*** BLURB HERE ***
Sascha Hauer (6):
  dmaengine: virt-dma: Do not call desc_free() under a spin_lock
  dmaengine: virt-dma: Add missing locking around list operations
  dmaengine: imx-sdma: rename function
  dmaengine: imx-sdma: find desc first in sdma_tx_status
  dmaengine: imx-sdma: Fix memory leak
  ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support

 arch/arm/configs/imx_v6_v7_defconfig |  2 ++
 drivers/dma/imx-sdma.c               | 37 +++++++++++++++++-----------
 drivers/dma/virt-dma.c               |  1 +
 drivers/dma/virt-dma.h               | 27 +++++++++++---------
 4 files changed, 41 insertions(+), 26 deletions(-)