From: sashiko-bot@kernel.org
To: "Jernej Skrabec" <jernej.skrabec@gmail.com>
Cc: linux-sunxi@lists.linux.dev
Subject: Re: [PATCH v2 2/3] mmc: sunxi: Build IDMA descriptors from mapped SG list
Date: Thu, 26 Nov 2026 18:35:55 +0000 [thread overview]
Message-ID: <sashiko-outbox-236027@kernel.org> (raw)
In-Reply-To: <20261126182944.3136900-3-jernej.skrabec@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] mmc: sunxi: missing Fixes trailer for DMA mapping and descriptor
fixes
--
commit b07dce4aab49723d2241431ba76eb43d418b71cd
Author: Jernej Skrabec <jernej.skrabec@gmail.com>
> mmc: sunxi: Build IDMA descriptors from mapped SG list
>
> dma_map_sg() may merge scatterlist entries and returns the number of
> resulting DMA segments. The DMA API requires using only that many
> segments, with sg_dma_address() and sg_dma_len() (see
> Documentation/core-api/dma-api.rst).
>
> The driver instead builds one descriptor per original entry and uses
> its CPU side length. Build the descriptors from the mapped segments
> instead, and split segments longer than one descriptor can handle.
> This can't overflow the descriptor table, as each original entry fits
> into a single descriptor.
>
> Also check the alignment of the mapped segments, and unmap the
> scatterlist when it is misaligned instead of leaking the mapping.
>
> Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
[Severity: Low]
Both the unmapped scatterlist usage in sunxi_mmc_init_idma_des() and the
DMA mapping leak on misaligned segments in sunxi_mmc_map_dma() date back
to the initial driver commit. Should this include:
Fixes: 3cbcb16095f9 ("mmc: sunxi: Add driver for SD/MMC hosts found on Allwinner sunxi SoCs")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126182944.3136900-1-jernej.skrabec@gmail.com?part=2
next prev parent reply other threads:[~2026-11-26 18:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 18:29 [PATCH v2 0/3] mmc: sunxi: preparation for A523 UHS support Jernej Skrabec
2026-11-26 18:29 ` [PATCH v2 1/3] mmc: sunxi: Set the IDMA DMA mask Jernej Skrabec
2026-11-26 18:29 ` [PATCH v2 2/3] mmc: sunxi: Build IDMA descriptors from mapped SG list Jernej Skrabec
2026-11-26 18:35 ` sashiko-bot [this message]
2026-11-26 18:29 ` [PATCH v2 3/3] mmc: sunxi: Distinguish CRC and timeout errors Jernej Skrabec
2026-11-26 18:40 ` sashiko-bot
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=sashiko-outbox-236027@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/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