From: sashiko-bot@kernel.org
To: "Daniel Golle" <daniel@makrotopia.org>, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH 4/7] media: rkvdec: vdpu381: Program the read caches
Date: Sat, 14 Nov 2026 11:23:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-214399@kernel.org> (raw)
In-Reply-To: <c052b9e59c9871315a24bbf129457b4dccbe3030.1794654074.git.daniel@makrotopia.org>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [Critical] media: rkvdec: missing device link for SRAM pool in
rkvdec_probe() [1]
--
commit 99da5f7b908ec0166f8a92ee5d45147870aca1c8
Author: Daniel Golle <daniel@makrotopia.org>
media: rkvdec: vdpu381: Program the read caches
This commit maps the VDPU381 "cache" register block in rkvdec_probe() and
configures and clears the three read caches before starting each H.264 and
HEVC decode run.
> diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec.c b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> index ba61e373b4342..5673c5205bfcd 100644
> --- a/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
[ ... ]
> @@ -1910,6 +1924,10 @@ static int rkvdec_probe(struct platform_device *pdev)
> rkvdec->link = devm_platform_ioremap_resource_byname(pdev, "link");
> if (IS_ERR(rkvdec->link))
> return PTR_ERR(rkvdec->link);
> +
> + rkvdec->cache = devm_platform_ioremap_resource_byname(pdev, "cache");
> + if (IS_ERR(rkvdec->cache))
> + return PTR_ERR(rkvdec->cache);
> }
>
> ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
[Severity: Critical]
This problem wasn't introduced by this patch, but can unbinding the SRAM
provider cause a use-after-free on rkvdec->sram_pool [1]?
Later in rkvdec_probe(), rkvdec->sram_pool is obtained via
of_gen_pool_get(pdev->dev.of_node, "sram", 0) without creating a device
link to the SRAM provider device. of_gen_pool_get() drops its device
reference before returning, so if the SRAM provider is unbound, devres
frees the gen_pool while rkvdec retains a dangling pointer that
rkvdec_allocate_rcb() and rkvdec_free_rcb() pass to
gen_pool_dma_zalloc_align() and gen_pool_free().
[1] https://sashiko.dev/#/bug/linux-052dff48-14cb-4d3e-8996-c834344fcb16
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1794654074.git.daniel@makrotopia.org?part=4
next prev parent reply other threads:[~2026-11-14 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 11:08 [PATCH 0/7] media: rockchip: rkvdec: add support for the VDPU346 variant Daniel Golle
2026-11-14 11:09 ` [PATCH 1/7] media: dt-bindings: rockchip: Add RK3568 Video Decoder bindings Daniel Golle
2026-11-14 11:09 ` [PATCH 2/7] media: rkvdec: Add support for the VDPU346 variant Daniel Golle
2026-11-14 11:09 ` [PATCH 3/7] media: rkvdec: vdpu346: Limit HEVC EXT SPS RPS dimensions Daniel Golle
2026-11-14 11:09 ` [PATCH 4/7] media: rkvdec: vdpu381: Program the read caches Daniel Golle
2026-11-14 11:23 ` sashiko-bot [this message]
2026-11-14 11:10 ` [PATCH 5/7] arm64: dts: rockchip: Add the vdpu346 Video Decoders on RK356X Daniel Golle
2026-11-14 11:10 ` [PATCH 6/7] arm64: dts: rockchip: rk356x: Order vdec regs by address Daniel Golle
2026-11-14 11:10 ` [PATCH 7/7] arm64: dts: rockchip: rk356x: Clock the vdec at 400 MHz Daniel Golle
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-214399@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=devicetree@vger.kernel.org \
--cc=media-ci@linuxtv.org \
--cc=robh@kernel.org \
--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