From: sashiko-bot@kernel.org
To: "Esben Haabendal" <esben@geanix.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 1/3] drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe()
Date: Mon, 03 Aug 2026 15:04:12 +0000 [thread overview]
Message-ID: <20260803150412.BF11F1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260803-ti-sn65dsi83-fixes-v3-1-9b403a405ccd@geanix.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Leaking an SRCU read lock on the error path in `sn65dsi83_reset_work()` due to an early return without calling `drm_bridge_exit()`.
--
--- Patch [1]: [PATCH v3 1/3] drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe() ---
commit d19637cc30dea31a13c6747fe2aa3733116ec5e5
Author: Esben Haabendal <esben@geanix.com>
drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe()
Propagate the error code from drm_bridge_helper_reset_crtc(), so that
callers has a chance to handle the failure.
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index 42b451432bbb6..476f255bd34dd 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> @@ -403,7 +403,7 @@ static int sn65dsi83_reset_pipe(struct sn65dsi83 *sn65dsi83)
> drm_modeset_drop_locks(&ctx);
> drm_modeset_acquire_fini(&ctx);
>
> - return 0;
> + return err;
> }
>
> static void sn65dsi83_reset_work(struct work_struct *ws)
[Severity: High]
Does propagating the error here cause an SRCU read lock leak?
By propagating the error from sn65dsi83_reset_pipe(), it is now possible
to hit the early return path in sn65dsi83_reset_work():
if (!drm_bridge_enter(&ctx->bridge, &idx))
return;
/* Reset the pipe */
ret = sn65dsi83_reset_pipe(ctx);
if (ret) {
dev_err(ctx->dev, "reset pipe failed %pe\n", ERR_PTR(ret));
return;
}
Because this early return skips the call to drm_bridge_exit(idx) at the
end of the function, wouldn't this leak the lock and cause a system hang
during drm_bridge_unplug() when synchronize_srcu() is called?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260803-ti-sn65dsi83-fixes-v3-0-9b403a405ccd@geanix.com?part=1
next prev parent reply other threads:[~2026-08-03 15:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 14:57 [PATCH v3 0/3] drm/bridge: ti-sn65dsi83: Various fixes Esben Haabendal
2026-08-03 14:57 ` [PATCH v3 1/3] drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe() Esben Haabendal
2026-08-03 15:04 ` sashiko-bot [this message]
2026-08-04 6:41 ` Esben Haabendal
2026-08-05 7:46 ` Luca Ceresoli
2026-08-05 7:56 ` Esben Haabendal
2026-08-03 14:57 ` [PATCH v3 2/3] drm/bridge: ti-sn65dsi83: Fix error handling in sn65dsi83_reset_work() Esben Haabendal
2026-08-03 15:21 ` sashiko-bot
2026-08-04 6:48 ` Esben Haabendal
2026-08-03 14:57 ` [PATCH v3 3/3] drm/bridge: ti-sn65dsi83: Support LVDS Channel B on SN65DSI84 Esben Haabendal
2026-08-06 9:02 ` [PATCH v3 0/3] drm/bridge: ti-sn65dsi83: Various fixes Luca Ceresoli
2026-08-06 9:20 ` Esben Haabendal
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=20260803150412.BF11F1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=esben@geanix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox