From: Esben Haabendal <esben@geanix.com>
To: <sashiko-bot@kernel.org>
Cc: <sashiko-reviews@lists.linux.dev>, <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v3 1/3] drm/bridge: ti-sn65dsi83: Propagate error in sn65dsi83_reset_pipe()
Date: Tue, 04 Aug 2026 08:41:52 +0200 [thread overview]
Message-ID: <87y0embd5b.fsf@geanix.com> (raw)
In-Reply-To: <20260803150412.BF11F1F000E9@smtp.kernel.org> (sashiko-bot@kernel.org's message of "Mon, 03 Aug 2026 15:04:12 +0000")
<sashiko-bot@kernel.org> writes:
> 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?
Yes. This is resolved in patch 2. I will reorder the patches in next
version.
/Esben
next prev parent reply other threads:[~2026-08-04 6:42 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
2026-08-04 6:41 ` Esben Haabendal [this message]
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=87y0embd5b.fsf@geanix.com \
--to=esben@geanix.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=sashiko-bot@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 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.