From: sashiko-bot@kernel.org
To: "Wentao Liang" <vulab@iscas.ac.cn>
Cc: dmaengine@vger.kernel.org, vkoul@kernel.org, Frank.Li@kernel.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: Fix runtime PM leak in hidma_issue_task()
Date: Wed, 16 Sep 2026 09:43:34 +0000 [thread overview]
Message-ID: <20260916094334.E304B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260916093032.2003397-1-vulab@iscas.ac.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] dmaengine: qcom_hidma: stranded active descriptors on pm_runtime_get_sync() failure
--
commit 77de19698670459fd2543b487a29198a77d2c2e6
Author: Wentao Liang <vulab@iscas.ac.cn>
dmaengine: qcom_hidma: Fix runtime PM leak in hidma_issue_task()
This commit fixes a runtime PM usage counter leak in hidma_issue_task() by
checking the return value of pm_runtime_get_sync(). If it fails, it drops
the counter with pm_runtime_put_noidle() and returns early to avoid starting
the transfer.
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index c939635be21d2..5ed6c77e2b212 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -219,7 +219,10 @@ static void hidma_issue_task(struct tasklet_struct *t)
> {
> struct hidma_dev *dmadev = from_tasklet(dmadev, t, task);
>
> - pm_runtime_get_sync(dmadev->ddev.dev);
> + if (pm_runtime_get_sync(dmadev->ddev.dev) < 0) {
> + pm_runtime_put_noidle(dmadev->ddev.dev);
> + return;
[Severity: Medium]
Does this early return leave active descriptors stranded without cleaning
them up?
When a DMA client queues a transaction, the descriptors are moved to the
active list before hidma_issue_task() is scheduled. Aborting the state
machine here without initiating the hardware transfer or failing the
descriptors can leave them permanently stuck.
This could cause DMA clients to hang indefinitely while waiting for
completion callbacks that will never arrive.
> + }
> hidma_ll_start(dmadev->lldev);
> }
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260916093032.2003397-1-vulab@iscas.ac.cn?part=1
next prev parent reply other threads:[~2026-09-16 9:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 9:30 [PATCH] dmaengine: qcom_hidma: Fix runtime PM leak in hidma_issue_task() Wentao Liang
2026-09-16 9:43 ` sashiko-bot [this message]
2026-09-16 15:55 ` Frank Li
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=20260916094334.E304B1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
--cc=vulab@iscas.ac.cn \
/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