Skip to contentSkip to conversation

dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()

PATCH Applied Qiu-ji Chen 4 participants 4 messages Jun 6, 2025 – Jun 26, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()

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

---
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(-)
drivers/dma/mediatek/mtk-cqdma.c +2 -2
index 47c8adfdc155..9f0c41ca7770 100644
@@ -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) {
Signature · 1 line
2.34.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Qiu-ji Chen

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()")
Quoted 24 lines

---
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(-)
drivers/dma/mediatek/mtk-cqdma.c +2 -2
index 47c8adfdc155..9f0c41ca7770 100644
@@ -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) {
maintainer Reviewed-by on v2 1/1
#2 lore raw
In reply to Qiu-ji Chen

Il 06/06/25 11:00, Qiu-ji Chen ha scritto:

Quoted 7 lines

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()")
maintainer Applied
#3 lore raw
In reply to Qiu-ji Chen
Quoted 3 lines · Qiu-ji Chen

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,

Signature · 1 line
~Vinod