From: Qiu-ji Chen <chenqiuji666@gmail.com>
To: sean.wang@mediatek.com, vkoul@kernel.org, matthias.bgg@gmail.com,
angelogioacchino.delregno@collabora.com,
eugen.hristev@linaro.org
Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org,
baijiaju1990@gmail.com, Qiu-ji Chen <chenqiuji666@gmail.com>,
stable@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status()
Date: Fri, 6 Jun 2025 17:00:17 +0800 [thread overview]
Message-ID: <20250606090017.5436-1-chenqiuji666@gmail.com> (raw)
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
next reply other threads:[~2025-06-06 9:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-06 9:00 Qiu-ji Chen [this message]
2025-06-11 13:05 ` [PATCH v2] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Eugen Hristev
2025-06-11 13:19 ` AngeloGioacchino Del Regno
2025-06-26 22:44 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250606090017.5436-1-chenqiuji666@gmail.com \
--to=chenqiuji666@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=baijiaju1990@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=eugen.hristev@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=lkp@intel.com \
--cc=matthias.bgg@gmail.com \
--cc=sean.wang@mediatek.com \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox