From: Vinod Koul <vkoul@kernel.org>
To: Keguang Zhang <keguang.zhang@gmail.com>,
Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
Cc: Frank Li <Frank.Li@kernel.org>, Frank Li <Frank.li@oss.nxp.com>,
linux-mips@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] dmaengine: loongson1-apb-dma: avoid using iterator variable after list_for_each_entry()
Date: Fri, 20 Nov 2026 15:30:58 +0530 [thread overview]
Message-ID: <179516885803.45276.9680446903666595138.b4-ty@kernel.org> (raw)
In-Reply-To: <20260917163025.7171-1-mahad.ibrahim.dev@gmail.com>
On Thu, 17 Sep 2026 16:30:25 +0000, Mahad Ibrahim wrote:
> ls1x_dma_tx_status() locates the descriptor actively being processed by
> walking the LLI list and comparing the hardware reported next descriptor
> pointer against each element's next-descriptor pointer.
>
> A list_for_each_entry macro is used in the comparison phase, which at
> the end of the loop leaves the lli pointer at the currently executing LLI.
> However this also subsequently runs for a non-match lli, in which it
> points at the head. This causes a type confusion bug which treats the
> head, which is a ls1x_dma_desc, as a ls1x_dma_lli object. Additionally it
> goes forwards and prints garbage via the dev_dbg.
>
> [...]
Applied, thanks!
[1/1] dmaengine: loongson1-apb-dma: avoid using iterator variable after list_for_each_entry()
commit: 5d4f5cdad22b181559c0bc8088f3ae9572ae4362
Best regards,
--
~Vinod
prev parent reply other threads:[~2026-11-20 10:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 16:30 Mahad Ibrahim
2026-09-17 17:03 ` Frank Li
2026-11-20 10:00 ` Vinod Koul [this message]
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=179516885803.45276.9680446903666595138.b4-ty@kernel.org \
--to=vkoul@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=Frank.li@oss.nxp.com \
--cc=dmaengine@vger.kernel.org \
--cc=keguang.zhang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=mahad.ibrahim.dev@gmail.com \
/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
all inboxes | Powered by JetHome®