Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vivekanandan, Balasubramani" <balasubramani.vivekanandan@intel.com>
To: "Summers, Stuart" <stuart.summers@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Dong, Zhanjun" <zhanjun.dong@intel.com>
Subject: Re: [PATCH v2 2/2] drm/xe/guc: Synchronize Dead CT worker with unbind
Date: Fri, 31 Oct 2025 20:23:37 +0530	[thread overview]
Message-ID: <aQTNcStpNqix46Iu@bvivekan-mobl1> (raw)
In-Reply-To: <4996795cdb5a48ab19247de78334df2b080c8758.camel@intel.com>

On 30.10.2025 23:08, Summers, Stuart wrote:
> On Thu, 2025-10-30 at 20:41 +0530, 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.
> 
> /s/undind/unbind/
> 
> And similar here - can you provide a stack trace?

Unfortunately I didn't save the stack trace. Kernel panic happened in
Dead CT worker after I applied the fix from the first patch and retried
the use case. Also the issue becomes sporadic after the first patch.

Regards,
Bala

> 
> Thanks,
> Stuart
> 
> > 
> > Cc: Zhanjun Dong <zhanjun.dong@intel.com>
> > 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 e68953ef3a00..536433b061fc 100644
> > --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> > +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> > @@ -199,6 +199,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);
> 

  reply	other threads:[~2025-10-31 14:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 15:11 [PATCH v2 0/2] Fix user-after-free during driver unbind Balasubramani Vivekanandan
2025-10-30 15:11 ` [PATCH v2 1/2] drm/xe/gt: Synchronize GT reset with device unbind Balasubramani Vivekanandan
2025-10-30 17:37   ` Summers, Stuart
2025-10-31 14:44     ` Vivekanandan, Balasubramani
2025-10-31 15:39   ` Matthew Brost
2025-10-31 16:17     ` Lucas De Marchi
2025-10-31 16:32       ` Matthew Brost
2025-10-30 15:11 ` [PATCH v2 2/2] drm/xe/guc: Synchronize Dead CT worker with unbind Balasubramani Vivekanandan
2025-10-30 17:38   ` Summers, Stuart
2025-10-31 14:53     ` Vivekanandan, Balasubramani [this message]
2025-10-31 16:10       ` Summers, Stuart
2025-10-30 16:25 ` ✓ CI.KUnit: success for Fix user-after-free during driver unbind (rev2) Patchwork
2025-10-30 17:03 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-30 19:44 ` ✓ Xe.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-10-30  8:26 [PATCH v2 0/2] Fix user-after-free during driver unbind Balasubramani Vivekanandan
2025-10-30  8:26 ` [PATCH v2 2/2] drm/xe/guc: Synchronize Dead CT worker with unbind Balasubramani Vivekanandan

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=aQTNcStpNqix46Iu@bvivekan-mobl1 \
    --to=balasubramani.vivekanandan@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=stuart.summers@intel.com \
    --cc=zhanjun.dong@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