From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3ED3420E005; Sun, 7 Sep 2025 20:15:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757276108; cv=none; b=Q+reI0+bNfzQu6Mzl+J8VLsWhLRPAt6XzF7JsTp0y0dJM6HVIu9DO84dBtGE6Ju4d2C8NI/8PwdpoSeDnYtJjm+W6MAx3P4d64NRlE2YtPPBU1QqW8rK9jGOjQa1G70smAmSOiPFHprJ5vsIAjexZ2DX10bhN50k+4Qp1OdXbJU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757276108; c=relaxed/simple; bh=PfwQK2KPcMbJSgo+LFjja/hs4gntIpl1aT8HpzZRyro=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=K7d2CAQ8+27MtTAJV3RFqZlEsmVnIqSMaD1xninLLYNQ9DK+24iG+MnH5eofO7IXiJH5XLoPbCq0HZir6WMw8rDJgGjL88+my5h9O9RjVJtg4nlTtYUZVOIEhpmxEa5NDA1EjETajJlVJ2t/K6yQI+0Sodo8Fqpmk0ePsgx4eGs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yx6wrqf1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="yx6wrqf1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE0DFC4CEF0; Sun, 7 Sep 2025 20:15:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757276108; bh=PfwQK2KPcMbJSgo+LFjja/hs4gntIpl1aT8HpzZRyro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yx6wrqf1XtqXWDGja6NL2RPQjfTenLK6Dn4gZ6bPW+EXrNa/u3yz7sQuPPkxkRvdi nIxrCq4kjetKj0so066DKe2tgzho2InOWf/F9Z3UwTiMnJHt2ZQ3EGVZFxqOsXxwJc KZR4q7sH1MKnuFedpquZh0w/MFqi6daqLNDY6LBw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, kernel test robot , Qiu-ji Chen , Eugen Hristev , AngeloGioacchino Del Regno , Vinod Koul , Sasha Levin Subject: [PATCH 5.15 64/64] dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() Date: Sun, 7 Sep 2025 21:58:46 +0200 Message-ID: <20250907195605.181810792@linuxfoundation.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250907195603.394640159@linuxfoundation.org> References: <20250907195603.394640159@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Qiu-ji Chen [ Upstream commit 8eba2187391e5ab49940cd02d6bd45a5617f4daf ] 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 Closes: https://lore.kernel.org/oe-kbuild-all/202505270641.MStzJUfU-lkp@intel.com/ Signed-off-by: Qiu-ji Chen Reviewed-by: Eugen Hristev Reviewed-by: AngeloGioacchino Del Regno Link: https://lore.kernel.org/r/20250606090017.5436-1-chenqiuji666@gmail.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- 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 39e902b279e64..60d1d56b98317 100644 --- a/drivers/dma/mediatek/mtk-cqdma.c +++ b/drivers/dma/mediatek/mtk-cqdma.c @@ -450,9 +450,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.51.0