From: sashiko-bot@kernel.org
To: "Osama Abdelkader" <osama.abdelkader@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels
Date: Wed, 12 Aug 2026 13:13:12 +0000 [thread overview]
Message-ID: <20260812131312.DBB181F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812130429.16850-4-osama.abdelkader@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Missing `drm_panel_remove()` in the error path of `ili9881c_dsi_probe()` when `devm_mipi_dsi_attach()` fails, leaving a dangling pointer in the global panel list and causing a Use-After-Free.
--
--- Patch [4]: [PATCH v3 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels ---
commit 3a10b5f724df17d382396b95194d7b29446eceae
Author: Osama Abdelkader <osama.abdelkader@gmail.com>
drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels
Use the managed MIPI DSI attach helper in Himax and Ilitek panel drivers
and drop the corresponding manual detach calls from remove paths.
> diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> index 3abdd0870e831..ca7037a4242c7 100644
> --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
> @@ -2597,14 +2597,12 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
> dsi->format = MIPI_DSI_FMT_RGB888;
> dsi->lanes = ctx->desc->lanes;
>
> - return mipi_dsi_attach(dsi);
> + return devm_mipi_dsi_attach(&dsi->dev, dsi);
> }
[Severity: High]
This is a pre-existing issue, but if devm_mipi_dsi_attach() fails here,
does it leave a dangling pointer in the global panel list?
Since ili9881c_dsi_probe() directly returns the result of the attach attempt
without calling drm_panel_remove() on failure, and the panel context
was allocated with devm_drm_panel_alloc(), the devres cleanup will free
the memory while it remains linked in panel_list.
Could this cause a use-after-free when the list is next traversed?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260812130429.16850-1-osama.abdelkader@gmail.com?part=4
next prev parent reply other threads:[~2026-08-12 13:13 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 13:04 [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Osama Abdelkader
2026-08-12 13:04 ` [PATCH v3 2/6] drm/panel: Use devm_mipi_dsi_attach in Samsung panels Osama Abdelkader
2026-08-12 13:04 ` [PATCH v3 3/6] drm/panel: Use devm_mipi_dsi_attach in Novatek and Raydium panels Osama Abdelkader
2026-08-12 13:16 ` sashiko-bot
2026-08-12 13:04 ` [PATCH v3 4/6] drm/panel: Use devm_mipi_dsi_attach in Himax and Ilitek panels Osama Abdelkader
2026-08-12 13:13 ` sashiko-bot [this message]
2026-08-12 13:04 ` [PATCH v3 5/6] drm/panel: Use devm_mipi_dsi_attach in display vendor panels Osama Abdelkader
2026-08-12 13:12 ` sashiko-bot
2026-08-12 13:04 ` [PATCH v3 6/6] drm/panel: Use devm_mipi_dsi_attach in assorted panels Osama Abdelkader
2026-08-12 13:18 ` sashiko-bot
2026-08-12 13:13 ` [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels sashiko-bot
2026-08-12 13:26 ` Maxime Ripard
2026-08-12 13:45 ` Luca Ceresoli
2026-08-12 14:23 ` Osama Abdelkader
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=20260812131312.DBB181F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=osama.abdelkader@gmail.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.