dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] virt-dma and i.MX SDMA fixes
@ 2019-12-10 12:33 Sascha Hauer
  2019-12-10 12:33 ` [PATCH 1/6] dmaengine: virt-dma: Do not call desc_free() under a spin_lock Sascha Hauer
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Sascha Hauer @ 2019-12-10 12:33 UTC (permalink / raw)
  To: dmaengine
  Cc: Vinod Koul, Pengutronix Kernel Team, NXP Linux Team,
	Peter Ujfalusi, Robert Jarzmik, Sascha Hauer

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(-)

-- 
2.24.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-12-10 15:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-10 12:33 [PATCH v2 0/6] virt-dma and i.MX SDMA fixes Sascha Hauer
2019-12-10 12:33 ` [PATCH 1/6] dmaengine: virt-dma: Do not call desc_free() under a spin_lock Sascha Hauer
2019-12-10 13:12   ` Peter Ujfalusi
2019-12-10 14:19     ` Sascha Hauer
2019-12-10 15:23       ` Peter Ujfalusi
2019-12-10 12:33 ` [PATCH 2/6] dmaengine: virt-dma: Add missing locking around list operations Sascha Hauer
2019-12-10 13:16   ` Peter Ujfalusi
2019-12-10 12:33 ` [PATCH 3/6] dmaengine: imx-sdma: rename function Sascha Hauer
2019-12-10 12:33 ` [PATCH 4/6] dmaengine: imx-sdma: find desc first in sdma_tx_status Sascha Hauer
2019-12-10 12:33 ` [PATCH 5/6] dmaengine: imx-sdma: Fix memory leak Sascha Hauer
2019-12-10 12:33 ` [PATCH 6/6] ARM: imx_v6_v7_defconfig: Enable NFS_V4_1 and NFS_V4_2 support Sascha Hauer
2019-12-10 13:56   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).