Skip to content

Commit 3f9aec7

Browse files
Jean Delvaregroeck
authored andcommitted
hwmon: (coretemp) Fix truncated name of alarm attributes
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]> Cc: [email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 319e2e3 commit 3f9aec7

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
@@ -52,7 +52,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
5252

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

0 commit comments

Comments
 (0)