From: sashiko-bot@kernel.org
To: "Hongyan Xu" <getshell@seu.edu.cn>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/vc4: drain GEM timer and work on teardown
Date: Mon, 28 Sep 2026 13:57:06 +0000 [thread overview]
Message-ID: <20260928135706.A2C921F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260928134100.420-1-getshell@seu.edu.cn>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/vc4: memory leak of vc4_exec_info due to unhandled job_done_list
--
commit 789f23627b59e9b2f1e7e763001ed796ee2df14b
Author: Hongyan Xu <getshell@seu.edu.cn>
drm/vc4: drain GEM timer and work on teardown
This commit updates vc4_gem_destroy() to shut down the hangcheck timer and
cancel both the hangcheck reset work and the job done work before destroying
the GEM state. This prevents asynchronous callbacks from executing after
the device structure has been released.
> diff --git a/drivers/gpu/drm/vc4/vc4_gem.c b/drivers/gpu/drm/vc4/vc4_gem.c
> --- a/drivers/gpu/drm/vc4/vc4_gem.c
> +++ b/drivers/gpu/drm/vc4/vc4_gem.c
> @@ -1202,6 +1202,10 @@ static void vc4_gem_destroy(struct drm_device *dev, void *unused)
> {
> struct vc4_dev *vc4 = to_vc4_dev(dev);
>
> + timer_shutdown_sync(&vc4->hangcheck.timer);
> + cancel_work_sync(&vc4->hangcheck.reset_work);
> + cancel_work_sync(&vc4->job_done_work);
[Severity: Medium]
In drivers/gpu/drm/vc4/vc4_gem.c:vc4_gem_destroy(), if there are completed
jobs waiting in vc4->job_done_list when this executes, does cancelling the
work here strand those jobs?
Since the scheduled cleanup work is cancelled and will not run, and
vc4_gem_destroy() does not manually flush or process job_done_list
afterwards, it seems any vc4_exec_info objects left in the list and their
associated GEM objects will be permanently leaked.
> +
> /* Waiting for exec to finish would need to be done before
> * unregistering V3D.
> */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928134100.420-1-getshell@seu.edu.cn?part=1
next prev parent reply other threads:[~2026-09-28 13:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 13:41 [PATCH] drm/vc4: drain GEM timer and work on teardown Hongyan Xu
2026-09-28 13:57 ` sashiko-bot [this message]
2026-09-28 19:32 ` Maíra Canal
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=20260928135706.A2C921F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=getshell@seu.edu.cn \
--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.