Linux Hardware Monitor development
 help / color / mirror / Atom feed
* [hwmon PATCH v2 0/8] hwmon: (adt7470): Multiple fixes
@ 2026-07-28  0:22 Luiz Angelo Daros de Luca
  2026-07-28  0:22 ` [hwmon PATCH v2 1/8] hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors Luiz Angelo Daros de Luca
                   ` (8 more replies)
  0 siblings, 9 replies; 29+ messages in thread
From: Luiz Angelo Daros de Luca @ 2026-07-28  0:22 UTC (permalink / raw)
  To: Guenter Roeck, Chris Packham, Andrew Morton, Darrick J. Wong,
	Mark M. Hoffman
  Cc: linux-hwmon, linux-kernel, Luiz Angelo Daros de Luca, sashiko-bot

This series fixes several issues in the adt7470 driver:

- Restore PWM configuration after I2C failures.
- Avoid cache corruption after failed writes.
- Prevent busy looping when auto_update_interval is zero.
- Fix incorrect temperature alarm reporting.
- Cache the PWM frequency and fix error propagation.
- Correct unused PWM auto-mode mask definitions.
- Fix TOCTOU issue when reading fan data.
- Fix PWM auto temp state array corruption and missing bounds check in
  sysfs read.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
Changes in v2:
- Added new patch to fix TOCTOU divide-by-zero crash in fan speed read.
- "Fix temperature alarm logic...": Added TEMP_ALARM_BIT and
  FAN_ALARM_BIT macros for clarity.
- "Use cached PWM frequency value": Fixed incorrect array indexing by
  caching the closest frequency early.
- Added patch to fix PWM auto temp state array corruption and missing bounds check.
- Link to v1: https://patch.msgid.link/20260727-adt7470_thermalzone-v3-0-21424d550c3d@gmail.com

To: Guenter Roeck <linux@roeck-us.net>
To: Chris Packham <chris.packham@alliedtelesis.co.nz>
To: Andrew Morton <akpm@linux-foundation.org>
To: "Darrick J. Wong" <djwong@us.ibm.com>
To: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: linux-hwmon@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

---
Luiz Angelo Daros de Luca (8):
      hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors
      hwmon: (adt7470) Fix cache updated before hardware write on I2C error
      hwmon: (adt7470) Fix busy-loop and I2C flooding in update thread
      hwmon: (adt7470) Fix swapped PWM3 and PWM4 auto mode masks
      hwmon: (adt7470) Fix temperature alarm logic in hwmon_temp_read()
      hwmon: (adt7470) Use cached PWM frequency value
      hwmon: (adt7470) Fix divide-by-zero TOCTOU crash in fan speed read
      hwmon: (adt7470) Fix PWM auto temp state array and bounds check

 drivers/hwmon/adt7470.c | 129 ++++++++++++++++++++++++++++++++++--------------
 1 file changed, 92 insertions(+), 37 deletions(-)
---
base-commit: 7e12ea5aae19ee07d466e9613ccba753349c9c1d
change-id: 20260716-adt7470_fixes-59a102278d72

Best regards,
--  
Luiz Angelo Daros de Luca <luizluca@gmail.com>


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2026-07-28  3:35 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28  0:22 [hwmon PATCH v2 0/8] hwmon: (adt7470): Multiple fixes Luiz Angelo Daros de Luca
2026-07-28  0:22 ` [hwmon PATCH v2 1/8] hwmon: (adt7470) Fix fans stuck in manual mode on I2C errors Luiz Angelo Daros de Luca
2026-07-28  0:30   ` sashiko-bot
2026-07-28  0:53   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 2/8] hwmon: (adt7470) Fix cache updated before hardware write on I2C error Luiz Angelo Daros de Luca
2026-07-28  0:34   ` sashiko-bot
2026-07-28  0:54   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 3/8] hwmon: (adt7470) Fix busy-loop and I2C flooding in update thread Luiz Angelo Daros de Luca
2026-07-28  0:37   ` sashiko-bot
2026-07-28  0:55   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 4/8] hwmon: (adt7470) Fix swapped PWM3 and PWM4 auto mode masks Luiz Angelo Daros de Luca
2026-07-28  0:34   ` sashiko-bot
2026-07-28  0:57   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 5/8] hwmon: (adt7470) Fix temperature alarm logic in hwmon_temp_read() Luiz Angelo Daros de Luca
2026-07-28  0:32   ` sashiko-bot
2026-07-28  0:55   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 6/8] hwmon: (adt7470) Use cached PWM frequency value Luiz Angelo Daros de Luca
2026-07-28  0:36   ` sashiko-bot
2026-07-28  0:51     ` Guenter Roeck
2026-07-28  0:57   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 7/8] hwmon: (adt7470) Fix divide-by-zero TOCTOU crash in fan speed read Luiz Angelo Daros de Luca
2026-07-28  0:37   ` sashiko-bot
2026-07-28  0:58   ` Guenter Roeck
2026-07-28  0:22 ` [hwmon PATCH v2 8/8] hwmon: (adt7470) Fix PWM auto temp state array and bounds check Luiz Angelo Daros de Luca
2026-07-28  0:40   ` sashiko-bot
2026-07-28  0:58   ` Guenter Roeck
2026-07-28  1:04 ` [hwmon PATCH v2 0/8] hwmon: (adt7470): Multiple fixes Guenter Roeck
2026-07-28  1:08   ` Luiz Angelo Daros de Luca
2026-07-28  3:35     ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox