Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'hwmon-for-v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:

- ltc4282: Fix reset_history file permissions

- ds620: Update broken Datasheet URL in driver documentation

- tmp401: Fix overflow caused by default conversion rate value

- ibmpex: Fix use-after-free in high/low store

- dell-smm: Limit fan multiplier to avoid overflow

* tag 'hwmon-for-v6.19-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
hwmon: (ltc4282): Fix reset_history file permissions
hwmon: (DS620) Update broken Datasheet URL in driver documentation
hwmon: (tmp401) fix overflow caused by default conversion rate value
hwmon: (ibmpex) fix use-after-free in high/low store
hwmon: (dell-smm) Limit fan multiplier to avoid overflow

+25 -8
+2 -2
Documentation/hwmon/ds620.rst
··· 7 7 8 8 Prefix: 'ds620' 9 9 10 - Datasheet: Publicly available at the Dallas Semiconductor website 10 + Datasheet: Publicly available at the Analog Devices website 11 11 12 - http://www.dalsemi.com/ 12 + https://www.analog.com/media/en/technical-documentation/data-sheets/DS620.pdf 13 13 14 14 Authors: 15 15 Roland Stigge <stigge@antcom.de>
+9
drivers/hwmon/dell-smm-hwmon.c
··· 76 76 #define DELL_SMM_NO_TEMP 10 77 77 #define DELL_SMM_NO_FANS 4 78 78 79 + /* limit fan multiplier to avoid overflow */ 80 + #define DELL_SMM_MAX_FAN_MULT (INT_MAX / U16_MAX) 81 + 79 82 struct smm_regs { 80 83 unsigned int eax; 81 84 unsigned int ebx; ··· 1256 1253 data->ops = ops; 1257 1254 /* All options must not be 0 */ 1258 1255 data->i8k_fan_mult = fan_mult ? : I8K_FAN_MULT; 1256 + if (data->i8k_fan_mult > DELL_SMM_MAX_FAN_MULT) { 1257 + dev_err(dev, 1258 + "fan multiplier %u is too large (max %u)\n", 1259 + data->i8k_fan_mult, DELL_SMM_MAX_FAN_MULT); 1260 + return -EINVAL; 1261 + } 1259 1262 data->i8k_fan_max = fan_max ? : I8K_FAN_HIGH; 1260 1263 data->i8k_pwm_mult = DIV_ROUND_UP(255, data->i8k_fan_max); 1261 1264
+7 -2
drivers/hwmon/ibmpex.c
··· 277 277 { 278 278 struct ibmpex_bmc_data *data = dev_get_drvdata(dev); 279 279 280 + if (!data) 281 + return -ENODEV; 282 + 280 283 ibmpex_reset_high_low_data(data); 281 284 282 285 return count; ··· 511 508 { 512 509 int i, j; 513 510 511 + hwmon_device_unregister(data->hwmon_dev); 512 + dev_set_drvdata(data->bmc_device, NULL); 513 + 514 514 device_remove_file(data->bmc_device, 515 515 &sensor_dev_attr_reset_high_low.dev_attr); 516 516 device_remove_file(data->bmc_device, &dev_attr_name.attr); ··· 527 521 } 528 522 529 523 list_del(&data->list); 530 - dev_set_drvdata(data->bmc_device, NULL); 531 - hwmon_device_unregister(data->hwmon_dev); 524 + 532 525 ipmi_destroy_user(data->user); 533 526 kfree(data->sensors); 534 527 kfree(data);
+6 -3
drivers/hwmon/ltc4282.c
··· 1000 1000 case hwmon_in_max: 1001 1001 case hwmon_in_min: 1002 1002 case hwmon_in_enable: 1003 - case hwmon_in_reset_history: 1004 1003 return 0644; 1004 + case hwmon_in_reset_history: 1005 + return 0200; 1005 1006 default: 1006 1007 return 0; 1007 1008 } ··· 1021 1020 return 0444; 1022 1021 case hwmon_curr_max: 1023 1022 case hwmon_curr_min: 1024 - case hwmon_curr_reset_history: 1025 1023 return 0644; 1024 + case hwmon_curr_reset_history: 1025 + return 0200; 1026 1026 default: 1027 1027 return 0; 1028 1028 } ··· 1041 1039 return 0444; 1042 1040 case hwmon_power_max: 1043 1041 case hwmon_power_min: 1044 - case hwmon_power_reset_history: 1045 1042 return 0644; 1043 + case hwmon_power_reset_history: 1044 + return 0200; 1046 1045 default: 1047 1046 return 0; 1048 1047 }
+1 -1
drivers/hwmon/tmp401.c
··· 397 397 ret = regmap_read(data->regmap, TMP401_CONVERSION_RATE, &regval); 398 398 if (ret < 0) 399 399 return ret; 400 - *val = (1 << (7 - regval)) * 125; 400 + *val = (1 << (7 - min(regval, 7))) * 125; 401 401 break; 402 402 case hwmon_chip_temp_reset_history: 403 403 *val = 0;