Skip to content

Commit e34cdde

Browse files
Jean Delvaregregkh
authored andcommitted
hwmon: (coretemp) Fix truncated name of alarm attributes
commit 3f9aec7 upstream. When the core number exceeds 9, the size of the buffer storing the alarm attribute name is insufficient and the attribute name is truncated. This causes libsensors to skip these attributes as the truncated name is not recognized. Reported-by: Andreas Hollmann <[email protected]> Signed-off-by: Jean Delvare <[email protected]> Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9a22404 commit e34cdde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hwmon/coretemp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
5353

5454
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
5555
#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */
56-
#define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */
56+
#define CORETEMP_NAME_LENGTH 19 /* String Length of attrs */
5757
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
5858
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
5959
#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)

0 commit comments

Comments
 (0)