From: sashiko-bot@kernel.org
To: "John Harrison" <John.Harrison@Igalia.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v8 7/8] drm/vc4: use drmm_writeback_connector_init()
Date: Thu, 23 Jul 2026 00:53:03 +0000 [thread overview]
Message-ID: <20260723005303.B27B61F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260723003205.330362-8-John.Harrison@Igalia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but the `vc4_txp_interrupt` handler can trigger a use-after-free on the `txp` structure if the component is unbound.
--
--- Patch [7]: [PATCH v8 7/8] drm/vc4: use drmm_writeback_connector_init() ---
Note: The format of this review has been altered to provide a free-form
summary of the findings due to recitation restrictions. The original patch
code is not directly quoted.
commit d2ba7084f0c0f5d055693e1cdaf9ce77bc6aa242
Author: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
drm/vc4: use drmm_writeback_connector_init()
This commit changes the VC4 driver to use drmm_writeback_connector_init()
instead of drm_writeback_connector_init() to ensure proper cleanup of the
job queue. It also removes the vc4_txp_unbind function.
[Severity: High]
This isn't a bug introduced by this patch, but does the component unbind flow
leave a dangling interrupt handler that can cause a use-after-free?
In vc4_txp_bind(), the txp structure is allocated using drmm_kzalloc(), tying
its lifecycle to the DRM master aggregate device.
However, the interrupt handler vc4_txp_interrupt() is registered using
devm_request_irq() on the component platform device.
If the DRM master is unbound via sysfs, the drmm-managed txp structure is
freed. Because the component platform device driver is not necessarily unbound,
the devm-managed IRQ handler remains active.
If an interrupt fires after the DRM device teardown, won't vc4_txp_interrupt()
dereference the freed txp structure?
Should the IRQ registration be tied to the DRM lifecycle, or should the IRQ
be explicitly disabled when the component unbinds?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723003205.330362-1-John.Harrison@Igalia.com?part=7
next prev parent reply other threads:[~2026-07-23 0:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 0:31 [PATCH v8 0/8] drm: writeback: clean up writeback connector initialization John Harrison
2026-07-23 0:31 ` [PATCH v8 1/8] drm/managed: implement managed versions of kzalloc_obj/objs() John Harrison
2026-07-23 0:31 ` [PATCH v8 2/8] drm/amd/display: use drmm allocation for writeback connector John Harrison
2026-07-23 0:54 ` sashiko-bot
2026-07-23 0:31 ` [PATCH v8 3/8] drm/amd/display: use drmm_writeback_connector_init() John Harrison
2026-07-23 0:53 ` sashiko-bot
2026-07-23 0:31 ` [PATCH v8 4/8] drm/komeda: " John Harrison
2026-07-23 1:02 ` sashiko-bot
2026-07-23 0:32 ` [PATCH v8 5/8] drm/mali: " John Harrison
2026-07-23 0:32 ` [PATCH v8 6/8] drm: renesas: rcar-du: " John Harrison
2026-07-23 0:32 ` [PATCH v8 7/8] drm/vc4: " John Harrison
2026-07-23 0:53 ` sashiko-bot [this message]
2026-07-23 0:32 ` [PATCH v8 8/8] drm: writeback: drop excess connector initialization functions John Harrison
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=20260723005303.B27B61F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=John.Harrison@Igalia.com \
--cc=dri-devel@lists.freedesktop.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.