From: sashiko-bot@kernel.org
To: "Mallesh Koujalagi" <mallesh.koujalagi@intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v13 4/4] drm/xe/ras: Use fault-inject to trigger cold-reset wedge
Date: Wed, 05 Aug 2026 07:24:12 +0000 [thread overview]
Message-ID: <20260805072413.96D061F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260805071152.1225416-10-mallesh.koujalagi@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The fault attribute `wedge_cold_reset` is declared as a global variable, causing a debugfs dentry memory leak and unintended shared state across devices.
--
--- Patch [4]: [PATCH v13 4/4] drm/xe/ras: Use fault-inject to trigger cold-reset wedge ---
commit c174fc4eba36eef0c9a2a3c15d3daee0c0dbc948
Author: Mallesh Koujalagi <mallesh.koujalagi@intel.com>
drm/xe/ras: Use fault-inject to trigger cold-reset wedge
Use the fault-inject framework to trigger the cold-reset
wedge path (punit_error_handler()) for testing the
wedge/recovery flow.
> diff --git a/drivers/gpu/drm/xe/xe_debugfs.c b/drivers/gpu/drm/xe/xe_debugfs.c
> index 8de78cd0aa03b..acd34cc5dcbdb 100644
> --- a/drivers/gpu/drm/xe/xe_debugfs.c
> +++ b/drivers/gpu/drm/xe/xe_debugfs.c
> @@ -42,6 +42,7 @@
>
> DECLARE_FAULT_ATTR(gt_reset_failure);
> DECLARE_FAULT_ATTR(inject_csc_hw_error);
> +DECLARE_FAULT_ATTR(wedge_cold_reset);
[Severity: Medium]
Since DECLARE_FAULT_ATTR() expands to a struct without the static keyword,
will this lead to kernel namespace pollution?
Also, because xe_fault_inject_debugfs_register() executes per-device,
will this globally shared attribute cause a debugfs dentry memory leak?
When fault_create_debugfs_attr() is called in the loop for each device:
drivers/gpu/drm/xe/xe_debugfs.c:xe_fault_inject_debugfs_register() {
...
fault_create_debugfs_attr(xe_fault_inject_entry[i].name, root,
xe_fault_inject_entry[i].attr);
...
}
Successive calls for multiple GPUs or during driver unbind/bind will overwrite
attr->dname with a newly referenced dentry without dropping the previous
reference.
This also means fault configurations will be shared across all devices rather
than being per-device. While this patch adds a new instance of an anti-pattern
already present in this file for the other attributes, is it possible to avoid
propagating it further?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260805071152.1225416-6-mallesh.koujalagi@intel.com?part=4
next prev parent reply other threads:[~2026-08-05 7:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-05 7:11 [PATCH v13 0/4] Introduce cold reset recovery method Mallesh Koujalagi
2026-08-05 7:11 ` [PATCH v13 1/4] drm: Add DRM_WEDGE_RECOVERY_COLD_RESET " Mallesh Koujalagi
2026-08-05 7:19 ` sashiko-bot
2026-08-05 7:11 ` [PATCH v13 2/4] drm/doc: Document " Mallesh Koujalagi
2026-08-05 7:20 ` sashiko-bot
2026-08-05 7:11 ` [PATCH v13 3/4] drm/xe: Handle PUNIT errors by requesting cold-reset recovery Mallesh Koujalagi
2026-08-05 7:30 ` sashiko-bot
2026-08-05 7:11 ` [PATCH v13 4/4] drm/xe/ras: Use fault-inject to trigger cold-reset wedge Mallesh Koujalagi
2026-08-05 7:24 ` sashiko-bot [this message]
2026-08-05 9:13 ` Raag Jadav
2026-08-05 10:01 ` Mallesh, Koujalagi
2026-08-05 11:50 ` ✓ CI.KUnit: success for Introduce cold reset recovery method (rev13) Patchwork
2026-08-05 12:31 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-05 22:59 ` ✗ Xe.CI.FULL: " Patchwork
2026-08-06 16:41 ` ✓ CI.KUnit: success for Introduce cold reset recovery method (rev14) Patchwork
2026-08-06 17:22 ` ✓ Xe.CI.BAT: " Patchwork
2026-08-07 5:53 ` ✗ 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=20260805072413.96D061F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=mallesh.koujalagi@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.