From: "Vivekanandan, Balasubramani" <balasubramani.vivekanandan@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
John Harrison <john.c.harrison@intel.com>
Subject: Re: [PATCH 2/2] drm/xe/guc: Synchronize Dead CT worker with unbind
Date: Mon, 13 Oct 2025 15:20:55 +0530 [thread overview]
Message-ID: <aOzLf2YRbBc6Qj-8@bvivekan-mobl1> (raw)
In-Reply-To: <20251013080900.1507609-6-balasubramani.vivekanandan@intel.com>
Corrected email address of John Harrison.
Regards,
Bala
On 13.10.2025 13:39, Balasubramani Vivekanandan wrote:
> Cancel and wait for any Dead CT worker to complete before continuing
> with device unbinding. Else the worker will end up using resources freed
> by the undind operation.
>
> Fixes: d2c5a5a926f4 ("drm/xe/guc: Dead CT helper")
> Signed-off-by: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
> ---
> drivers/gpu/drm/xe/xe_guc_ct.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index 47079ab9922c..d1a994c5ad02 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -197,6 +197,9 @@ static void guc_ct_fini(struct drm_device *drm, void *arg)
> {
> struct xe_guc_ct *ct = arg;
>
> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
> + cancel_work_sync(&ct->dead.worker);
> +#endif
> ct_exit_safe_mode(ct);
> destroy_workqueue(ct->g2h_wq);
> xa_destroy(&ct->fence_lookup);
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-10-13 9:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 8:09 [PATCH 0/2] Fix user-after-free during driver unbind Balasubramani Vivekanandan
2025-10-13 8:09 ` [PATCH 1/2] drm/xe/gt: Synchronize GT reset with device unbind Balasubramani Vivekanandan
2025-10-13 14:12 ` Lucas De Marchi
2025-10-13 8:09 ` [PATCH 2/2] drm/xe/guc: Synchronize Dead CT worker with unbind Balasubramani Vivekanandan
2025-10-13 9:50 ` Vivekanandan, Balasubramani [this message]
2025-10-13 8:17 ` ✓ CI.KUnit: success for Fix user-after-free during driver unbind Patchwork
2025-10-13 8:59 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-13 9:26 ` ✓ Xe.CI.Full: " Patchwork
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=aOzLf2YRbBc6Qj-8@bvivekan-mobl1 \
--to=balasubramani.vivekanandan@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=john.c.harrison@intel.com \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@intel.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