From: "Nilawar, Badal" <badal.nilawar@intel.com>
To: <sashiko-reviews@lists.linux.dev>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v3] drm/xe/i2c: Expose AMC Alert reason sysfs
Date: Thu, 1 Oct 2026 19:47:28 +0530 [thread overview]
Message-ID: <ee350beb-c940-46b7-811c-8f6d93698d32@intel.com> (raw)
In-Reply-To: <20261001120746.06F791F00898@smtp.kernel.org>
On 01-10-2026 17:37, sashiko-bot@kernel.org wrote:
>> +/**
>> + * DOC: AMC Alert Reason
>> + *
>> + * Expose AMC alert reason through device sysfs
>> + *
>> + * See Documentation/ABI/testing/sysfs-driver-intel-xe-amc for the ABI
>> + * specification.
>> + */
>> +
>> +static ssize_t amc_alert_reason_show(struct device *dev,
>> + struct device_attribute *attr, char *buf)
>> +{
>> + struct xe_device *xe = pdev_to_xe_device(to_pci_dev(dev));
>> + struct xe_amc *amc = xe->i2c->amc;
>> + u8 alert_reason;
>> +
>> + if (!amc->alert_seen)
> [Severity: Medium]
> Could this read of amc->alert_seen cause a data race?
>
> The sysfs reader relies on this boolean flag to decide whether to read
> alert_reason, but it lacks memory barriers or READ_ONCE(). A concurrent
> sysfs reader might observe an inconsistent state here while a new alert
> is being processed.
|alert_seen is not intended as a synchronization mechanism. |
|It only distinguishes the initial state where no AMC alert has been
received. |
|The sysfs attribute is expected to be queried after the device is
declared wedged, by which point the alert state has already been recorded.|
next prev parent reply other threads:[~2026-10-01 14:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 12:13 [PATCH v3] drm/xe/i2c: Expose AMC Alert reason sysfs Badal Nilawar
2026-10-01 12:02 ` ✗ CI.checkpatch: warning for " Patchwork
2026-10-01 12:04 ` ✓ CI.KUnit: success " Patchwork
2026-10-01 12:07 ` [PATCH v3] " sashiko-bot
2026-10-01 13:29 ` Nilawar, Badal
2026-10-01 14:17 ` Nilawar, Badal [this message]
2026-10-01 14:54 ` Jani Nikula
2026-10-01 16:26 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-01 19:33 ` ✗ 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=ee350beb-c940-46b7-811c-8f6d93698d32@intel.com \
--to=badal.nilawar@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--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