5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rupesh Majhi commit b5c5b67e02406fb48acf57cf2c30a570230fd6aa upstream. On 64-bit, update_interval writes are clamped to LONG_MAX ms, but ms_to_ktime() overflows above 9223372036854 ms and the interval wraps. LONG_MAX becomes -1 ms, so every read starts a new measurement and update_interval reads back -1. Clamp to INT_MAX like sht4x, so the limit is the same on all platforms. Fixes: 8c78f0dee437 ("hwmon: Add AHT10 Temperature and Humidity Sensor Driver") Cc: stable@vger.kernel.org Signed-off-by: Rupesh Majhi Link: https://patch.msgid.link/20261108172651.220121-1-zoone.rupert@gmail.com Signed-off-by: Guenter Roeck Signed-off-by: Greg Kroah-Hartman --- drivers/hwmon/aht10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hwmon/aht10.c +++ b/drivers/hwmon/aht10.c @@ -182,7 +182,7 @@ static int aht10_read_values(struct aht1 static ssize_t aht10_interval_write(struct aht10_data *data, long val) { - data->min_poll_interval = ms_to_ktime(clamp_val(val, 2000, LONG_MAX)); + data->min_poll_interval = ms_to_ktime(clamp_val(val, 2000, INT_MAX)); return 0; }