Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raag Jadav <raag.jadav@intel.com>
To: "Tauro, Riana" <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org, anshuman.gupta@intel.com,
	rodrigo.vivi@intel.com, aravind.iddamsetty@linux.intel.com,
	mallesh.koujalagi@intel.com, badal.nilawar@intel.com
Subject: Re: [PATCH v4 2/8] drm/xe/hw_error: Initialize hw_error_work per tile
Date: Wed, 11 Nov 2026 06:40:54 +0100	[thread overview]
Message-ID: <avP_5gPyp1iSFP0Q@black.igk.intel.com> (raw)
In-Reply-To: <f16bdbfd-919f-471f-a954-d5e0a7f36159@intel.com>

On Wed, Nov 11, 2026 at 10:15:26AM +0530, Tauro, Riana wrote:
> On 10-11-2026 18:10, Raag Jadav wrote:
> > On Fri, Nov 06, 2026 at 12:49:47PM +0530, Riana Tauro wrote:
> > > From: Raag Jadav <raag.jadav@intel.com>
> > > 
> > > Since hw_error_work is now being reused generically, initialize it per tile
> > > so that we don't hit uninitialized work for non-root tile. While at it,
> > > disable hw_error_work on fini to prevent UAF during unwind.
> > > 
> > > Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> > > Reviewed-by: Riana Tauro <riana.tauro@intel.com>
> > > Signed-off-by: Riana Tauro <riana.tauro@intel.com>
> > > ---
> > > v2: add dgfx and sriov check (Sashiko)
> > > 
> > > v3: retain original patch and fix unload issue in later patches
> > > ---
> > >   drivers/gpu/drm/xe/xe_hw_error.c | 20 ++++++++++++++++++--
> > >   1 file changed, 18 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/xe/xe_hw_error.c b/drivers/gpu/drm/xe/xe_hw_error.c
> > > index a934b649575c..f7031b341ce0 100644
> > > --- a/drivers/gpu/drm/xe/xe_hw_error.c
> > > +++ b/drivers/gpu/drm/xe/xe_hw_error.c
> > > @@ -537,6 +537,19 @@ static void process_hw_errors(struct xe_device *xe)
> > >   	}
> > >   }
> > > +static void hw_error_fini(void *arg)
> > > +{
> > > +	struct xe_device *xe = arg;
> > > +	struct xe_tile *tile;
> > > +	u8 id;
> > > +
> > > +	if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
> > Why is this needed? fini is not even registered for these cases.
> > Not everything is a bug because AI says so :)
> 
> This is added so that it can be re-used in error_detected in patch [7/8]

Which sounds like this should be introduced in the patch which reuses it.

Raag

> > > +		return;
> > > +
> > > +	for_each_tile(tile, xe, id)
> > > +		disable_work_sync(&tile->hw_error_work);
> > > +}
> > > +
> > >   /**
> > >    * xe_hw_error_init - Initialize hw errors
> > >    * @xe: xe device instance
> > > @@ -546,12 +559,15 @@ static void process_hw_errors(struct xe_device *xe)
> > >    */
> > >   void xe_hw_error_init(struct xe_device *xe)
> > >   {
> > > -	struct xe_tile *tile = xe_device_get_root_tile(xe);
> > > +	struct xe_tile *tile;
> > > +	u8 id;
> > >   	if (!IS_DGFX(xe) || IS_SRIOV_VF(xe))
> > >   		return;
> > > -	INIT_WORK(&tile->hw_error_work, hw_error_work);
> > > +	for_each_tile(tile, xe, id)
> > > +		INIT_WORK(&tile->hw_error_work, hw_error_work);
> > >   	process_hw_errors(xe);
> > > +	devm_add_action_or_reset(xe->drm.dev, hw_error_fini, xe);
> > >   }
> > > -- 
> > > 2.47.1
> > > 

  reply	other threads:[~2026-11-11  5:41 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06  7:19 [PATCH v4 0/8] Handle non-fatal errors routed via IRQ Riana Tauro
2026-11-06  7:19 ` [PATCH v4 1/8] drm/xe/hw_error: Reuse CSC worker for generic error handling Riana Tauro
2026-11-06  7:19 ` [PATCH v4 2/8] drm/xe/hw_error: Initialize hw_error_work per tile Riana Tauro
2026-11-10  5:48   ` Mallesh, Koujalagi
2026-11-10 12:40   ` Raag Jadav
2026-11-11  4:45     ` Tauro, Riana
2026-11-11  5:40       ` Raag Jadav [this message]
2026-11-11  5:51         ` Tauro, Riana
2026-11-06  7:19 ` [PATCH v4 3/8] drm/xe/survivability: Guard runtime survivability enable against unbind Riana Tauro
2026-11-10  6:19   ` Mallesh, Koujalagi
2026-11-10 12:51   ` Raag Jadav
2026-11-11  4:43     ` Tauro, Riana
2026-11-11  5:39       ` Raag Jadav
2026-11-11  5:50         ` Tauro, Riana
2026-11-11  7:09           ` Raag Jadav
2026-11-11  7:17             ` Tauro, Riana
2026-11-06  7:19 ` [PATCH v4 4/8] drm/xe/ras: Treat non-fatal PCIe errors as recovered Riana Tauro
2026-11-06  7:19 ` [PATCH v4 5/8] drm/xe/pci: Add upstream switch port lookup helper Riana Tauro
2026-11-06  7:19 ` [PATCH v4 6/8] drm/xe/xe_ras: Add a flag for uncorrectable internal error Riana Tauro
2026-11-10 13:07   ` Raag Jadav
2026-11-11  4:47     ` Tauro, Riana
2026-11-06  7:19 ` [PATCH v4 7/8] drm/xe: Add support for wa_14028434957 Riana Tauro
2026-11-10  6:41   ` Mallesh, Koujalagi
2026-11-10 13:18   ` Raag Jadav
2026-11-11  4:50     ` Tauro, Riana
2026-11-11  6:15       ` Raag Jadav
2026-11-11  6:22         ` Tauro, Riana
2026-11-06  7:19 ` [PATCH v4 8/8] drm/xe/xe_ras: Skip double-bit ECC page offlining on AER path Riana Tauro
2026-11-06  7:27 ` ✗ CI.checkpatch: warning for Handle non-fatal errors routed via IRQ (rev4) Patchwork
2026-11-06  7:29 ` ✓ CI.KUnit: success " Patchwork
2026-11-06  8:13 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-07  7:38 ` ✗ Xe.CI.FULL: failure " 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=avP_5gPyp1iSFP0Q@black.igk.intel.com \
    --to=raag.jadav@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=aravind.iddamsetty@linux.intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mallesh.koujalagi@intel.com \
    --cc=riana.tauro@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