public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
@ 2025-06-06  9:00 Qiu-ji Chen
  2025-06-11 13:05 ` Eugen Hristev
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qiu-ji Chen @ 2025-06-06  9:00 UTC (permalink / raw)
  To: sean.wang, vkoul, matthias.bgg, angelogioacchino.delregno,
	eugen.hristev
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel,
	baijiaju1990, Qiu-ji Chen, stable, kernel test robot

Fixed a flag reuse bug in the mtk_cqdma_tx_status() function.

Fixes: 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()")
Cc: stable@vger.kernel.org
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUfU-lkp@intel.com/
Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
---
V2:
Change the inner vc lock from spin_lock_irqsave() to spin_lock()
Thanks Eugen Hristev for helpful suggestion.
---
 drivers/dma/mediatek/mtk-cqdma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/mediatek/mtk-cqdma.c b/drivers/dma/mediatek/mtk-cqdma.c
index 47c8adfdc155..9f0c41ca7770 100644
--- a/drivers/dma/mediatek/mtk-cqdma.c
+++ b/drivers/dma/mediatek/mtk-cqdma.c
@@ -449,9 +449,9 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c,
 		return ret;
 
 	spin_lock_irqsave(&cvc->pc->lock, flags);
-	spin_lock_irqsave(&cvc->vc.lock, flags);
+	spin_lock(&cvc->vc.lock);
 	vd = mtk_cqdma_find_active_desc(c, cookie);
-	spin_unlock_irqrestore(&cvc->vc.lock, flags);
+	spin_unlock(&cvc->vc.lock);
 	spin_unlock_irqrestore(&cvc->pc->lock, flags);
 
 	if (vd) {
-- 
2.34.1



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

* Re: [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
  2025-06-06  9:00 [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Qiu-ji Chen
@ 2025-06-11 13:05 ` Eugen Hristev
  2025-06-11 13:19 ` AngeloGioacchino Del Regno
  2025-06-26 22:44 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Eugen Hristev @ 2025-06-11 13:05 UTC (permalink / raw)
  To: Qiu-ji Chen, sean.wang, vkoul, matthias.bgg,
	angelogioacchino.delregno
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel,
	baijiaju1990, stable, kernel test robot



On 6/6/25 12:00, Qiu-ji Chen wrote:
> Fixed a flag reuse bug in the mtk_cqdma_tx_status() function.
> 
> Fixes: 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()")
> Cc: stable@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUfU-lkp@intel.com/
> Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>

Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>

> ---
> V2:
> Change the inner vc lock from spin_lock_irqsave() to spin_lock()
> Thanks Eugen Hristev for helpful suggestion.
> ---
>  drivers/dma/mediatek/mtk-cqdma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/mediatek/mtk-cqdma.c b/drivers/dma/mediatek/mtk-cqdma.c
> index 47c8adfdc155..9f0c41ca7770 100644
> --- a/drivers/dma/mediatek/mtk-cqdma.c
> +++ b/drivers/dma/mediatek/mtk-cqdma.c
> @@ -449,9 +449,9 @@ static enum dma_status mtk_cqdma_tx_status(struct dma_chan *c,
>  		return ret;
>  
>  	spin_lock_irqsave(&cvc->pc->lock, flags);
> -	spin_lock_irqsave(&cvc->vc.lock, flags);
> +	spin_lock(&cvc->vc.lock);
>  	vd = mtk_cqdma_find_active_desc(c, cookie);
> -	spin_unlock_irqrestore(&cvc->vc.lock, flags);
> +	spin_unlock(&cvc->vc.lock);
>  	spin_unlock_irqrestore(&cvc->pc->lock, flags);
>  
>  	if (vd) {



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

* Re: [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
  2025-06-06  9:00 [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Qiu-ji Chen
  2025-06-11 13:05 ` Eugen Hristev
@ 2025-06-11 13:19 ` AngeloGioacchino Del Regno
  2025-06-26 22:44 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-06-11 13:19 UTC (permalink / raw)
  To: Qiu-ji Chen, sean.wang, vkoul, matthias.bgg, eugen.hristev
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel,
	baijiaju1990, stable, kernel test robot

Il 06/06/25 11:00, Qiu-ji Chen ha scritto:
> Fixed a flag reuse bug in the mtk_cqdma_tx_status() function.
> 
> Fixes: 157ae5ffd76a ("dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status()")
> Cc: stable@vger.kernel.org
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUfU-lkp@intel.com/
> Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>




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

* Re: [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
  2025-06-06  9:00 [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Qiu-ji Chen
  2025-06-11 13:05 ` Eugen Hristev
  2025-06-11 13:19 ` AngeloGioacchino Del Regno
@ 2025-06-26 22:44 ` Vinod Koul
  2 siblings, 0 replies; 4+ messages in thread
From: Vinod Koul @ 2025-06-26 22:44 UTC (permalink / raw)
  To: sean.wang, matthias.bgg, angelogioacchino.delregno, eugen.hristev,
	Qiu-ji Chen
  Cc: dmaengine, linux-arm-kernel, linux-mediatek, linux-kernel,
	baijiaju1990, stable, kernel test robot


On Fri, 06 Jun 2025 17:00:17 +0800, Qiu-ji Chen wrote:
> Fixed a flag reuse bug in the mtk_cqdma_tx_status() function.
> 
> 

Applied, thanks!

[1/1] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
      commit: 8eba2187391e5ab49940cd02d6bd45a5617f4daf

Best regards,
-- 
~Vinod




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

end of thread, other threads:[~2025-06-27  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06  9:00 [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Qiu-ji Chen
2025-06-11 13:05 ` Eugen Hristev
2025-06-11 13:19 ` AngeloGioacchino Del Regno
2025-06-26 22:44 ` Vinod Koul

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