DMA Engine development
 help / color / mirror / Atom feed
* [2/5] dmaengine: mv_xor_v2: kill the tasklets upon exit
@ 2018-07-17 10:30 hannah
  0 siblings, 0 replies; only message in thread
From: hannah @ 2018-07-17 10:30 UTC (permalink / raw)
  To: dan.j.williams, vkoul, dmaengine
  Cc: thomas.petazzoni, linux-kernel, nadavh, omrii, oferh,
	gregory.clement, Hanna Hawa

From: Hanna Hawa <hannah@marvell.com>

The mv_xor_v2 driver uses a tasklet, initialized during the probe()
routine. However, it forgets to cleanup the tasklet using
tasklet_kill() function during the remove() routine, which this patch
fixes. This prevents the tasklet from potentially running after the
module has been removed.

Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")

Signed-off-by: Hanna Hawa <hannah@marvell.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 drivers/dma/mv_xor_v2.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/dma/mv_xor_v2.c b/drivers/dma/mv_xor_v2.c
index e16083a..e718498 100644
--- a/drivers/dma/mv_xor_v2.c
+++ b/drivers/dma/mv_xor_v2.c
@@ -903,6 +903,8 @@ static int mv_xor_v2_remove(struct platform_device *pdev)
 
 	platform_msi_domain_free_irqs(&pdev->dev);
 
+	tasklet_kill(&xor_dev->irq_tasklet);
+
 	clk_disable_unprepare(xor_dev->clk);
 
 	return 0;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-17 10:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-17 10:30 [2/5] dmaengine: mv_xor_v2: kill the tasklets upon exit hannah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox