All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Riana Tauro" <riana.tauro@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/xe/hw_error: Initialize hw_error_work per tile
Date: Sun, 30 Aug 2026 07:14:47 +0000	[thread overview]
Message-ID: <20260830071447.A301C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260830065603.419055-7-riana.tauro@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Ignored return value of devm_add_action_or_reset() leads to silent failure and permanently disabled workqueues on allocation failure.
--

commit 4131be68c9832cc5157abbfbeb9802dae9fcbca5
Author: Raag Jadav <raag.jadav@intel.com>

drm/xe/hw_error: Initialize hw_error_work per tile

This commit updates the hw_error_work initialization to iterate over all
tiles instead of just the root tile, preventing the use of uninitialized
work structs on non-root tiles. It also adds a devm action to cleanly
disable the workqueues during teardown.

> diff --git a/drivers/gpu/drm/xe/xe_hw_error.c b/drivers/gpu/drm/xe/xe_hw_error.c
> --- a/drivers/gpu/drm/xe/xe_hw_error.c
> +++ b/drivers/gpu/drm/xe/xe_hw_error.c

[ ... ]

> @@ -544,12 +554,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);

[Severity: Medium]
Does this code need to check the return value of devm_add_action_or_reset()
in xe_hw_error_init()?

If memory allocation fails internally, devm_add_action_or_reset() will
immediately execute hw_error_fini() (which disables the workqueues) and
return -ENOMEM. Because the return value is ignored here, the driver will
continue operating normally but with the hardware error workqueue permanently
disabled. This could lead to a silent loss of functionality where hardware
errors are no longer handled.

>  }

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260830065603.419055-5-riana.tauro@intel.com?part=2

  reply	other threads:[~2026-08-30  7:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30  6:56 [PATCH 0/3] Handle non-fatal errors routed via IRQ Riana Tauro
2026-08-30  6:56 ` [PATCH 1/3] drm/xe/hw_error: Reuse CSC worker for generic error handling Riana Tauro
2026-08-30  6:56 ` [PATCH 2/3] drm/xe/hw_error: Initialize hw_error_work per tile Riana Tauro
2026-08-30  7:14   ` sashiko-bot [this message]
2026-08-30  6:56 ` [PATCH 3/3] drm/xe/xe_hw_error: Handle non-fatal errors routed via direct IRQ Riana Tauro
2026-08-30  7:09   ` sashiko-bot
2026-08-30  7:03 ` ✓ CI.KUnit: success for Handle non-fatal errors routed via IRQ Patchwork
2026-08-30  7:46 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-30  8:58 ` ✓ 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=20260830071447.A301C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=riana.tauro@intel.com \
    --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.