From: sashiko-bot@kernel.org
To: "Laurent Pinchart" <laurent.pinchart+renesas@ideasonboard.com>
Cc: robh@kernel.org, dri-devel@lists.freedesktop.org,
devicetree@vger.kernel.org, conor+dt@kernel.org,
wsa+renesas@sang-engineering.com
Subject: Re: [PATCH 3/4] drm/bridge: display-connector: Support hardcoded EDID for VGA connectors
Date: Sun, 05 Jul 2026 21:44:52 +0000 [thread overview]
Message-ID: <20260705214453.5195C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260705213542.28987-4-laurent.pinchart+renesas@ideasonboard.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Use-After-Free of devm-managed resources and missing asynchronous cleanup during device removal when the driver is unbound.
--
commit 48f63e147d7554f73cd9df360e29fd0b0ddb5d8d
Author: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drm/bridge: display-connector: Support hardcoded EDID for VGA connectors
This commit adds support for parsing a hardcoded EDID blob from the device tree
for VGA connectors when DDC signals are not connected. It also ensures that
specifying both a DDC bus and a hardcoded EDID returns an error during probe.
> diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm/bridge/display-connector.c
> index eb3412ec30a07..225a8e987d086 100644
> --- a/drivers/gpu/drm/bridge/display-connector.c
> +++ b/drivers/gpu/drm/bridge/display-connector.c
[ ... ]
> @@ -64,6 +67,9 @@ static enum drm_connector_status display_connector_detect(struct drm_bridge *bri
> if (conn->bridge.ddc && drm_probe_ddc(conn->bridge.ddc))
> return connector_status_connected;
>
> + if (conn->edid)
> + return connector_status_connected;
> +
[Severity: High]
This isn't a bug introduced by this patch, but does device removal have a
use-after-free vulnerability when the driver is unbound via sysfs?
Looking at display_connector_detect() in
drivers/gpu/drm/bridge/display-connector.c, if the driver is bound and attached
to a DRM encoder, and then unbound via sysfs:
1. display_connector_remove() calls drm_bridge_remove() but does not call
disable_irq() or cancel_work_sync(&conn->hpd_work).
2. The bridge structure is kept alive because the DRM core still holds a
reference count.
3. The driver core's devres_release_all() runs and frees conn->hpd_gpio and
the IRQ.
If the DRM core then polls detect, it will execute display_connector_detect():
if (conn->hpd_gpio) {
if (gpiod_get_value_cansleep(conn->hpd_gpio))
...
Will this dereference the devres-freed conn->hpd_gpio?
Additionally, if the concurrent hpd_work executes, will it attempt to lock
bridge->hpd_mutex which was already destroyed by drm_bridge_remove()?
> switch (conn->bridge.type) {
> case DRM_MODE_CONNECTOR_DVIA:
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260705213542.28987-1-laurent.pinchart+renesas@ideasonboard.com?part=3
next prev parent reply other threads:[~2026-07-05 21:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-05 21:35 [PATCH 0/4] drm: bridge: display-connector: Support hardcoding EDID for VGA Laurent Pinchart
2026-07-05 21:35 ` [PATCH 1/4] dt-bindings: display: vga-connector: Allow hardcoding EDID Laurent Pinchart
2026-07-06 8:08 ` Geert Uytterhoeven
2026-07-06 10:03 ` Laurent Pinchart
2026-07-06 8:52 ` Maxime Ripard
2026-07-06 9:45 ` Laurent Pinchart
2026-07-06 15:40 ` Maxime Ripard
2026-07-06 16:02 ` Laurent Pinchart
2026-07-05 21:35 ` [PATCH 2/4] drm/bridge: display-connector: Fix I2C adapter resource leak Laurent Pinchart
2026-07-05 21:48 ` sashiko-bot
2026-07-05 23:38 ` Laurent Pinchart
2026-07-05 21:35 ` [PATCH 3/4] drm/bridge: display-connector: Support hardcoded EDID for VGA connectors Laurent Pinchart
2026-07-05 21:44 ` sashiko-bot [this message]
2026-07-05 23:38 ` Laurent Pinchart
2026-07-05 21:35 ` [PATCH 4/4] [DNI] arm64: dts: renesas: salvator: Add overlay for Dell P1911 VGA display Laurent Pinchart
2026-07-05 21:37 ` sashiko-bot
2026-07-05 23:39 ` Laurent Pinchart
2026-07-06 8:16 ` Geert Uytterhoeven
2026-07-06 9:48 ` Laurent Pinchart
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=20260705214453.5195C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.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