[PATCH v2] Buffer size too small when reading sysinfo

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On a system with 160 CPUs the /proc/cpuinfo size grows beyond
the currently set limit of 10KB causing an internal error.

This patch increases the buffer size to 1MB.

Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx>
---
 src/util/virsysinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c
index 1bb6392..789c3bc 100644
--- a/src/util/virsysinfo.c
+++ b/src/util/virsysinfo.c
@@ -50,7 +50,7 @@ static const char *sysinfoCpuinfo = "/proc/cpuinfo";
 #define SYSINFO_SMBIOS_DECODER sysinfoDmidecode
 #define SYSINFO sysinfoSysinfo
 #define CPUINFO sysinfoCpuinfo
-#define CPUINFO_FILE_LEN (10*1024)	/* 10KB limit for /proc/cpuinfo file */
+#define CPUINFO_FILE_LEN (1024*1024)	/* 1MB limit for /proc/cpuinfo file */
 
 /* only to be used test programs, therefore not in sysinfo.h */
 extern void virSysinfoSetup(const char *dmidecode, const char *sysinfo,
-- 
1.9.3


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]