From: "Mallesh, Koujalagi" <mallesh.koujalagi@intel.com>
To: Riana Tauro <riana.tauro@intel.com>, <intel-xe@lists.freedesktop.org>
Cc: <anshuman.gupta@intel.com>, <rodrigo.vivi@intel.com>,
<aravind.iddamsetty@linux.intel.com>, <raag.jadav@intel.com>,
<badal.nilawar@intel.com>
Subject: Re: [PATCH v4 2/8] drm/xe/hw_error: Initialize hw_error_work per tile
Date: Tue, 10 Nov 2026 11:18:34 +0530 [thread overview]
Message-ID: <70f11ea1-e96c-47e9-9d73-691d86c4cb86@intel.com> (raw)
In-Reply-To: <20261106071944.2693854-12-riana.tauro@intel.com>
On 06-11-2026 12:49 pm, 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>
LGTM,
Reviewed-by: Mallesh Koujalagi <mallesh.koujalagi@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))
> + 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);
> }
next prev parent reply other threads:[~2026-11-10 5:49 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 [this message]
2026-11-10 12:40 ` Raag Jadav
2026-11-11 4:45 ` Tauro, Riana
2026-11-11 5:40 ` Raag Jadav
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=70f11ea1-e96c-47e9-9d73-691d86c4cb86@intel.com \
--to=mallesh.koujalagi@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=raag.jadav@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 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.