Re: [PATCH 1/2] hwmon: (sht4x) Add missing locks

[email protected]
Newsgroups org.kernel.vger.linux-hwmon
Message-ID <[email protected]>
> Sashiko reports:
> 
> Heater sysfs callbacks (heater_enable_store, heater_power_store, and
> heater_time_store) are exposed to data races without the hwmon lock.
> 
> If a user-space process reads hwmon data while another process enables
> the heater, heater_enable_store() executes without holding
> hwmon_lock(dev). This can interleave I2C commands and mutate shared
> state (data->heating_complete and data->data_pending) concurrently
> with sht4x_read_values(), leading to corrupted I2C sequences.
> 
> Fixes: 53dfa12299c1 ("hwmon: (sht4x) Rely on subsystem locking")
> Cc: Alessandro Zini <[email protected]>
> Signed-off-by: Guenter Roeck <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.