From: sashiko-bot@kernel.org
To: "Guenter Roeck" <linux@roeck-us.net>,
"Hardware Monitoring" <linux-hwmon@vger.kernel.org>
Subject: Re: [PATCH 2/2] hwmon: (gigabyte_waterforce) Protect status report data with spinlock
Date: Sat, 31 Oct 2026 22:35:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-192207@kernel.org> (raw)
In-Reply-To: <20261031223131.1855967-2-linux@roeck-us.net>
> waterforce_raw_event() updates temp_input, speed_input, duty_input, and
> the updated timestamp without holding priv->status_report_request_lock
> (and updates priv->updated after complete_all()), while
> waterforce_get_status() and waterforce_read() read those fields without
> synchronization.
>
> Because HID_CONNECT_HIDRAW is enabled, or when an interrupted wait leaves
> a requested report in flight, waterforce_raw_event() can execute
> concurrently with sysfs reads. Under the Linux kernel memory model this
> constitutes a data race, lacks memory ordering between priv->updated and
> the cached sensor fields on weakly ordered architectures, and allows a
> reader woken by complete_all() to re-enter waterforce_get_status() before
> priv->updated is refreshed.
>
> Extend priv->status_report_request_lock to cover updating the sensor
> values and priv->updated in waterforce_raw_event(), checking priv->updated
> in waterforce_get_status(), and reading the cached sensor values in
> waterforce_read().
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Fixes: 42ac68e3d4ba ("hwmon: Add driver for Gigabyte AORUS Waterforce AIO coolers")
> Cc: Aleksa Savic <savicaleksa83@gmail.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261031223131.1855967-1-linux@roeck-us.net?part=2
next prev parent reply other threads:[~2026-10-31 22:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-31 22:31 [PATCH 1/2] hwmon: (gigabyte_waterforce) Make status_report_request_lock IRQ safe Guenter Roeck
2026-10-31 22:31 ` [PATCH 2/2] hwmon: (gigabyte_waterforce) Protect status report data with spinlock Guenter Roeck
2026-10-31 22:35 ` sashiko-bot [this message]
2026-10-31 22:33 ` [PATCH 1/2] hwmon: (gigabyte_waterforce) Make status_report_request_lock IRQ safe sashiko-bot
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-192207@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--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.