From: sashiko-bot@kernel.org
To: "Raag Jadav" <raag.jadav@intel.com>, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v10 8/9] drm/xe: Introduce xe_wedge
Date: Fri, 16 Oct 2026 07:34:46 +0000 [thread overview]
Message-ID: <sashiko-outbox-173935@kernel.org> (raw)
In-Reply-To: <20261016072623.457392-9-raag.jadav@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] drm/xe: missing lock in xe_wedge_set_mode() allows inconsistent state
--
commit 099845d336cfe3f2b49209afcef197ab88c425f6
Author: Raag Jadav <raag.jadav@intel.com>
Subject: drm/xe: Introduce xe_wedge
Consolidate wedging implementation into a dedicated xe_wedge component for
better maintainability. While at it, rename all wedge helpers to match with
component name.
> diff --git a/drivers/gpu/drm/xe/xe_wedge.c b/drivers/gpu/drm/xe/xe_wedge.c
> new file mode 100644
> index 0000000000000..2f35937c5e661
> --- /dev/null
> +++ b/drivers/gpu/drm/xe/xe_wedge.c
[ ... ]
> +int xe_wedge_set_mode(struct xe_device *xe, enum xe_wedged_mode mode)
> +{
> + int ret;
> +
> + ret = wedge_validate_mode(xe, mode);
> + if (ret)
> + return ret;
> +
> + if (wedge_mode_needs_policy_update(xe, mode)) {
> + ret = wedge_mode_set_reset_policy(xe, mode);
> + if (ret)
> + return ret;
> + }
> +
> + xe->wedged.mode = mode;
[Severity: Low]
Can this sequence of updates lead to an inconsistent state if multiple threads
write to the wedged_mode debugfs node concurrently?
It looks like the multi-step update of the hardware reset policy and the
software mode tracking is not serialized by any lock in xe_wedge_set_mode().
If Thread A and Thread B concurrently write to the debugfs file:
Thread A checks wedge_mode_needs_policy_update() and proceeds to apply
the hardware settings.
Thread B checks and applies different settings.
Thread B writes its software state to xe->wedged.mode.
Thread A writes its software state to xe->wedged.mode.
Could the hardware reset policy become desynchronized from the software
state, potentially leading to lost hang recoveries or incorrect behavior?
> +
> + return ret;
> +}
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261016072623.457392-1-raag.jadav@intel.com?part=8
next prev parent reply other threads:[~2026-10-16 7:34 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 7:25 [PATCH v10 0/9] Introduce xe_wedge Raag Jadav
2026-10-16 7:25 ` [PATCH v10 1/9] drm/xe/gt: Use GT ordered workqueue for wedging Raag Jadav
2026-10-16 7:50 ` sashiko-bot
2026-10-16 7:25 ` [PATCH v10 2/9] drm/xe: Drop xe_device_set_wedged_method() Raag Jadav
2026-10-16 7:25 ` [PATCH v10 3/9] drm/xe/hw_error: Guard csc_hw_error_work() with runtime PM Raag Jadav
2026-10-16 7:43 ` sashiko-bot
2026-10-16 7:25 ` [PATCH v10 4/9] drm/xe: Move xe_device_wedged_fini() registration to xe_device_probe_early() Raag Jadav
2026-10-16 7:25 ` [PATCH v10 5/9] drm/xe: Make xe_device_declare_wedged() IRQ safe Raag Jadav
2026-10-16 7:26 ` [PATCH v10 6/9] drm/xe/pci_error: Flush GT wedge worker before bus reset Raag Jadav
2026-10-16 7:44 ` sashiko-bot
2026-10-16 7:26 ` [PATCH v10 7/9] drm/xe/amc: Guard xe_amc_work() with runtime PM Raag Jadav
2026-10-16 7:36 ` sashiko-bot
2026-10-16 7:26 ` [PATCH v10 8/9] drm/xe: Introduce xe_wedge Raag Jadav
2026-10-16 7:34 ` sashiko-bot [this message]
2026-10-16 7:26 ` [PATCH v10 9/9] drm/xe/ras: Move xe_ras_process_errors() to xe_ras Raag Jadav
2026-10-16 7:52 ` sashiko-bot
2026-10-16 8:05 ` ✗ CI.checkpatch: warning for Introduce xe_wedge (rev9) Patchwork
2026-10-16 8:06 ` ✗ CI.KUnit: 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=sashiko-outbox-173935@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=raag.jadav@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox