summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2014-01-14 15:59:55 +0100
committerChanho Park <chanho61.park@samsung.com>2015-12-22 13:40:43 +0900
commit7b9985ac6033c774027a8ed4c332b934d0252ec3 (patch)
treee9d59e3b94828fa54fd6971c4fd9762d7979adc8 /drivers/hwmon
parent9f9b30eba9c2c92b1fbce12f1752f218473d1623 (diff)
downloadlinux-3.10-artik-7b9985ac6033c774027a8ed4c332b934d0252ec3.tar.gz
linux-3.10-artik-7b9985ac6033c774027a8ed4c332b934d0252ec3.tar.bz2
linux-3.10-artik-7b9985ac6033c774027a8ed4c332b934d0252ec3.zip
hwmon: (coretemp) Fix truncated name of alarm attributes
commit 3f9aec7610b39521c7c69d754de7265f6994c194 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 <hollmann@in.tum.de> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/coretemp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 658ce3a8717..0cf25101b3c 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -52,7 +52,7 @@ MODULE_PARM_DESC(tjmax, "TjMax value in degrees Celsius");
#define BASE_SYSFS_ATTR_NO 2 /* Sysfs Base attr no for coretemp */
#define NUM_REAL_CORES 32 /* Number of Real cores per cpu */
-#define CORETEMP_NAME_LENGTH 17 /* String Length of attrs */
+#define CORETEMP_NAME_LENGTH 19 /* String Length of attrs */
#define MAX_CORE_ATTRS 4 /* Maximum no of basic attrs */
#define TOTAL_ATTRS (MAX_CORE_ATTRS + 1)
#define MAX_CORE_DATA (NUM_REAL_CORES + BASE_SYSFS_ATTR_NO)