public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dma: mmp_tdma: kill tasklet when free dma channel
@ 2013-06-07 11:40 Qiao Zhou
  2013-06-12  9:51 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Qiao Zhou @ 2013-06-07 11:40 UTC (permalink / raw)
  To: vinod.koul, djbw, zhangfei.gao, linux-kernel; +Cc: Qiao Zhou

kill tasklet task when free dam channel, otherwise the task may
run after related resource is released, then unknown things may
happen.

Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
---
 drivers/dma/mmp_tdma.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 43d5a6c..2622b2a 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -333,6 +333,9 @@ static void mmp_tdma_free_chan_resources(struct dma_chan *chan)
 
 	if (tdmac->irq)
 		devm_free_irq(tdmac->dev, tdmac->irq, tdmac);
+
+	tasklet_kill(&tdmac->tasklet);
+
 	mmp_tdma_free_descriptor(tdmac);
 	return;
 }
-- 
1.7.0.4


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

* Re: [PATCH] dma: mmp_tdma: kill tasklet when free dma channel
  2013-06-07 11:40 [PATCH] dma: mmp_tdma: kill tasklet when free dma channel Qiao Zhou
@ 2013-06-12  9:51 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2013-06-12  9:51 UTC (permalink / raw)
  To: Qiao Zhou; +Cc: djbw, zhangfei.gao, linux-kernel

On Fri, Jun 07, 2013 at 07:40:40PM +0800, Qiao Zhou wrote:
> kill tasklet task when free dam channel, otherwise the task may
typo			      ^^^^

> run after related resource is released, then unknown things may
> happen.
Well, why would tasklet run when channel is freed. You are supposed to cleanup
the DMA channel on free. Ensure all transaction are aborted

Sounds like masking some issue

--
~Vinod
> 
> Signed-off-by: Qiao Zhou <zhouqiao@marvell.com>
> ---
>  drivers/dma/mmp_tdma.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
> index 43d5a6c..2622b2a 100644
> --- a/drivers/dma/mmp_tdma.c
> +++ b/drivers/dma/mmp_tdma.c
> @@ -333,6 +333,9 @@ static void mmp_tdma_free_chan_resources(struct dma_chan *chan)
>  
>  	if (tdmac->irq)
>  		devm_free_irq(tdmac->dev, tdmac->irq, tdmac);
> +
> +	tasklet_kill(&tdmac->tasklet);
> +
>  	mmp_tdma_free_descriptor(tdmac);
>  	return;
>  }
> -- 
> 1.7.0.4
> 

-- 

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

end of thread, other threads:[~2013-06-12 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07 11:40 [PATCH] dma: mmp_tdma: kill tasklet when free dma channel Qiao Zhou
2013-06-12  9:51 ` Vinod Koul

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