WSL2-Linux-Kernel/drivers/hwmon
Guenter Roeck cc4be794c8 hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
[ Upstream commit 5c1de37969b7bc0abcb20b86e91e70caebbd4f89 ]

DIV_ROUND_CLOSEST() after kstrtol() results in an underflow if a large
negative number such as -9223372036854775808 is provided by the user.
Fix it by reordering clamp_val() and DIV_ROUND_CLOSEST() operations.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-12 11:07:48 +02:00
..
occ hwmon: (occ) Prevent power cap command overwriting poll response 2022-07-07 17:53:35 +02:00
pmbus hwmon: (pmbus/ucd9000) Increase delay from 250 to 500us 2024-05-17 11:51:05 +02:00
Kconfig hwmon: (jc42) Convert register access and caching to regmap/regcache 2022-12-31 13:14:15 +01:00
Makefile hwmon: add driver for Aquacomputer D5 Next 2021-08-28 08:53:30 -07:00
abituguru.c
abituguru3.c
acpi_power_meter.c hwmon: (acpi_power_meter) Fix 4.29 MW bug 2023-12-13 18:36:39 +01:00
ad7314.c
ad7414.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
ad7418.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adc128d818.c hwmon: (adc128d818) Fix underflows seen when writing limit attributes 2024-09-12 11:07:48 +02:00
adcxx.c
adm1021.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adm1025.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adm1026.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adm1029.c hwmon: (adm1029) use simple i2c probe 2020-09-23 09:42:39 -07:00
adm1031.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adm1177.c hwmon: (adm1177) Fix kerneldoc attribute formatting 2020-12-02 17:42:23 -08:00
adm9240.c hwmon: (adm9240) Fix writes into inX_max attributes 2021-05-12 18:53:11 -07:00
ads7828.c hwmon: use simple i2c probe function (take 2) 2020-09-23 09:42:40 -07:00
ads7871.c
adt7x10.c
adt7x10.h
adt7310.c
adt7410.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adt7411.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adt7462.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
adt7470.c hwmon: (adt7470) Fix warning on module removal 2022-05-12 12:30:11 +02:00
adt7475.c hwmon: (adt7475) Fix default duty on fan is disabled 2024-08-19 05:44:50 +02:00
aht10.c hwmon: (aht10) Unlock on error in aht10_read_values() 2021-01-27 17:44:19 -08:00
amc6821.c hwmon: (amc6821) add of_match table 2024-04-10 16:18:40 +02:00
applesmc.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
aquacomputer_d5next.c hwmon: add driver for Aquacomputer D5 Next 2021-08-28 08:53:30 -07:00
as370-hwmon.c
asb100.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
asc7621.c hwmon: (asc7621) use simple i2c probe 2020-09-23 09:42:40 -07:00
aspeed-pwm-tacho.c hwmon: (aspeed-pwm-tacho) mutex for tach reading 2024-02-23 08:54:57 +01:00
asus_atk0110.c
atxp1.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
axi-fan-control.c hwmon: (axi-fan-control) Fix possible NULL pointer dereference 2023-11-20 11:08:18 +01:00
bt1-pvt.c hwmon: (bt1-pvt) Remove redundant error printing in pvt_request_regs() 2021-06-17 04:21:45 -07:00
bt1-pvt.h hwmon: (bt1-pvt) Cache current update timeout 2020-10-04 08:40:10 -07:00
coretemp.c hwmon: (coretemp) Enlarge per package core count limit 2024-03-01 13:21:47 +01:00
corsair-cpro.c hwmon: (corsair-cpro) Protect ccp->wait_input_report with a spinlock 2024-05-17 11:50:58 +02:00
corsair-psu.c hwmon: (corsair-psu) Fix probe when built-in 2024-01-25 14:52:29 -08:00
da9052-hwmon.c hwmon: (da9052) Switch to using the new API kobj_to_dev() 2021-02-11 20:28:56 -08:00
da9055-hwmon.c
dell-smm-hwmon.c hwmon: (dell-smm) Add Dell XPS 13 7390 to fan control whitelist 2022-08-17 14:23:04 +02:00
dme1737.c hwmon: (dme1737) use simple i2c probe 2020-09-23 09:42:40 -07:00
drivetemp.c hwmon: (drivetemp) Add module alias 2022-08-17 14:23:13 +02:00
ds620.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
ds1621.c hwmon: (ds1621) Use kobj_to_dev() 2021-04-20 06:50:14 -07:00
emc6w201.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
emc1403.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
emc2103.c hwmon: (emc2103) use simple i2c probe 2020-09-23 09:42:40 -07:00
f71805f.c
f71882fg.c hwmon: (f71882fg) Fix negative temperature 2022-05-18 10:26:51 +02:00
f75375s.c hwmon: (f75375s) use simple i2c probe 2020-09-23 09:42:40 -07:00
fam15h_power.c hwmon: Replace deprecated CPU-hotplug functions. 2021-08-17 14:54:26 -07:00
fschmd.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
ftsteutates.c hwmon: (ftsteutates) Fix scaling of measurements 2023-03-10 09:39:21 +01:00
g760a.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
g762.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
gl518sm.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
gl520sm.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
gpio-fan.c hwmon: (gpio-fan) Fix array out of bounds access 2022-09-08 12:28:05 +02:00
gsc-hwmon.c hwmon: (gsc-hwmon) fix fan pwm temperature scaling 2023-07-23 13:47:05 +02:00
hih6130.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
hwmon-vid.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
hwmon.c hwmon: fix potential sensor registration fail if of_node is missing 2023-03-30 12:47:51 +02:00
i5k_amb.c
i5500_temp.c hwmon: (i5500_temp) fix missing pci_disable_device() 2022-12-08 11:28:39 +01:00
ibmaem.c hwmon: (ibmaem) don't call platform_device_del() if platform_device_add() fails 2022-07-07 17:53:35 +02:00
ibmpex.c hwmon: (ibmpex) Fix possible UAF when ibmpex_register_bmc() fails 2022-12-08 11:28:39 +01:00
ibmpowernv.c hwmon: (ibmpowernv) Silence strncpy() warning 2020-12-02 17:42:23 -08:00
iio_hwmon.c hwmon: (iio_hwmon) Drop bogus __refdata annotation 2020-12-11 07:42:27 -08:00
ina2xx.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ina209.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ina3221.c hwmon: (ina3221) return prober error code 2023-03-22 13:31:29 +01:00
intel-m10-bmc-hwmon.c hwmon: intel-m10-bmc-hwmon: add n5010 sensors 2021-08-17 14:54:25 -07:00
it87.c hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs 2023-03-30 12:47:51 +02:00
jc42.c hwmon: (jc42) Fix missing unlock on error in jc42_write() 2022-12-31 13:14:44 +01:00
k8temp.c
k10temp.c hwmon: (k10temp) Enable AMD3255 Proc to show negative temperature 2023-08-03 10:22:43 +02:00
lineage-pem.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
lm63.c hwmon: Use kobj_to_dev() 2021-04-20 06:50:14 -07:00
lm70.c hwmon: (lm70) Use SPI_MODE_X_MASK 2021-06-17 04:21:44 -07:00
lm73.c hwmon: (lm73) use simple i2c probe 2020-09-23 09:42:40 -07:00
lm75.c hwmon: (lm75) Add TI TMP1075 support 2021-06-17 04:21:44 -07:00
lm75.h
lm77.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm78.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm80.c Revert "hwmon: (lm80) fix a missing check of bus read in lm80 probe" 2021-05-13 17:30:01 +02:00
lm83.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm85.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm87.c hwmon: use simple i2c probe function (take 2) 2020-09-23 09:42:40 -07:00
lm90.c hwmon: (lm90) Fix sysfs and udev notifications 2022-02-01 17:27:12 +01:00
lm92.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm93.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm95234.c hwmon: (lm95234) Fix underflows seen when writing limit attributes 2024-09-12 11:07:48 +02:00
lm95241.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lm95245.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
lochnagar-hwmon.c
ltc2945.c hwmon: (ltc2945) Handle error case in ltc2945_value_store 2023-03-10 09:39:28 +01:00
ltc2947-core.c hwmon: (ltc2947) fix temperature scaling 2022-12-08 11:28:39 +01:00
ltc2947-i2c.c hwmon: (ltc2947) use simple i2c probe 2020-09-23 09:42:40 -07:00
ltc2947-spi.c
ltc2947.h
ltc2990.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltc2992.c hwmon: (ltc2992) Fix memory leak in ltc2992_parse_dt() 2024-09-04 13:23:36 +02:00
ltc4151.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltc4215.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltc4222.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltc4245.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
ltc4260.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltc4261.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
ltq-cputemp.c
max127.c hwmon: (max127) Add Maxim MAX127 hardware monitoring driver 2020-12-02 17:42:24 -08:00
max197.c
max1111.c
max1619.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
max1668.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
max6621.c hwmon: (max6621) Fix fall-through warnings for Clang 2021-05-17 19:50:37 -05:00
max6639.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
max6642.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
max6650.c hwmon: (max6650) Switch to using the new API kobj_to_dev() 2021-01-27 17:44:18 -08:00
max6697.c hwmon: (max6697) Fix swapped temp{1,8} critical alarms 2024-08-19 05:44:51 +02:00
max16065.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
max31722.c hwmon: (max31722) Remove non-standard ACPI device IDs 2021-06-17 04:21:44 -07:00
max31730.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
max31790.c hwmon: (max31790) Detect and report zero fan speed 2021-06-17 04:21:46 -07:00
mc13783-adc.c
mcp3021.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
menf21bmc_hwmon.c
mlxreg-fan.c hwmon: (mlxreg-fan) Return zero speed for broken fan 2023-03-10 09:39:30 +01:00
mr75203.c hwmon: (mr75203) enable polling for all VM channels 2022-09-15 11:30:07 +02:00
nct6683.c hwmon: (nct6683) remove useless function 2021-04-20 06:50:14 -07:00
nct6775.c hwmon: (nct6775-core) Fix underflows seen when writing limit attributes 2024-09-12 11:07:48 +02:00
nct7802.c hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled 2023-08-03 10:22:44 +02:00
nct7904.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
npcm750-pwm-fan.c
nsa320-hwmon.c
ntc_thermistor.c hwmon: (ntc_thermistor) Use library interpolation 2021-08-17 14:54:25 -07:00
nzxt-kraken2.c hwmon: (nzxt-kraken2) Fix error handling path in kraken2_probe() 2023-12-13 18:36:40 +01:00
pc87360.c hwmon: (pc87360) convert comma to semicolon 2021-01-27 17:44:17 -08:00
pc87427.c
pcf8591.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
powr1220.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
pwm-fan.c hwmon: (pwm-fan) Ensure the fan going on in .probe() 2021-12-14 10:57:14 +01:00
raspberrypi-hwmon.c hwmon: raspberry-pi: Clean-up few drivers by using managed work init 2021-03-23 15:22:40 +01:00
s3c-hwmon.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
sbrmi.c hwmon: Add support for SB-RMI power module 2021-08-17 14:54:25 -07:00
sbtsi_temp.c hwmon: (sbtsi) Add basic support for SB-TSI sensors 2020-12-12 08:32:35 -08:00
sch56xx-common.c hwmon: (sch56xx-common) Replace WDOG_ACTIVE with WDOG_HW_RUNNING 2022-04-08 14:23:07 +02:00
sch56xx-common.h hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
sch5627.c hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
sch5636.c hwmon: (sch56xx) Use devres functions for watchdog 2021-06-17 04:21:44 -07:00
scmi-hwmon.c hwmon: (scmi) port driver to the new scmi_sensor_proto_ops interface 2021-03-30 16:34:55 +01:00
scpi-hwmon.c hwmon: (scpi-hwmon) shows the negative temperature properly 2021-06-09 11:51:30 -07:00
sht3x.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
sht4x.c hwmon: (sht4x) do not overflow clamping operation on 32-bit platforms 2022-10-26 12:35:37 +02:00
sht15.c hwmon: (sht15) Fix wrong assumptions in device remove callback 2022-08-17 14:23:04 +02:00
sht21.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
shtc1.c hwmon: (shtc1) Fix property misspelling 2024-06-16 13:39:52 +02:00
sis5595.c
sl28cpld-hwmon.c hwmon: Add support for the sl28cpld hardware monitoring controller 2020-09-17 16:02:42 +01:00
smm665.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
smsc47b397.c
smsc47m1.c hwmon: (smsc47m1) Remove 'h' from printk format specifier 2021-01-27 17:44:17 -08:00
smsc47m192.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
sparx5-temp.c hwmon: (sparx5) Fix initial reading of temperature 2020-09-23 09:39:40 -07:00
stts751.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
tc74.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
tc654.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
thmc50.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
tmp102.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
tmp103.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
tmp108.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
tmp401.c hwmon: (tmp401) Add OF device ID table 2022-05-18 10:26:47 +02:00
tmp421.c hwmon: (tmp421) fix rounding for negative values 2021-09-24 05:00:53 -07:00
tmp513.c hwmon: (tmp513) Fix the channel number in tmp51x_is_visible() 2023-09-19 12:22:35 +02:00
tps23861.c hwmon: (tps23861) fix byte order in resistance register 2022-09-15 11:30:06 +02:00
ultra45_env.c
vexpress-hwmon.c hwmon: replace snprintf in show functions with sysfs_emit 2021-04-20 06:50:14 -07:00
via-cputemp.c
via686a.c
vt1211.c
vt8231.c
w83l785ts.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
w83l786ng.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
w83627ehf.c hwmon: (w83627ehf) Fix underflows seen when writing limit attributes 2024-09-12 11:07:48 +02:00
w83627hf.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
w83773g.c hwmon: use simple i2c probe function 2020-09-23 09:42:39 -07:00
w83781d.c hwmon: (w83781d) Match on device tree compatibles 2021-08-17 14:54:26 -07:00
w83791d.c hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field 2021-10-02 05:11:52 -07:00
w83792d.c hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field 2021-10-02 05:12:05 -07:00
w83793.c hwmon: (w83793) Fix NULL pointer dereference by removing unnecessary structure field 2021-10-02 05:14:11 -07:00
w83795.c hwmon: use simple i2c probe function (take 2) 2020-09-23 09:42:40 -07:00
wm831x-hwmon.c
wm8350-hwmon.c
xgene-hwmon.c hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition 2023-03-22 13:31:29 +01:00