mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
Buffer size too small when reading sysinfo
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@linux.vnet.ibm.com>
This commit is contained in:
parent
af5c3a1015
commit
531aef2e1b
@ -50,7 +50,7 @@ static const char *sysinfoCpuinfo = "/proc/cpuinfo";
|
|||||||
#define SYSINFO_SMBIOS_DECODER sysinfoDmidecode
|
#define SYSINFO_SMBIOS_DECODER sysinfoDmidecode
|
||||||
#define SYSINFO sysinfoSysinfo
|
#define SYSINFO sysinfoSysinfo
|
||||||
#define CPUINFO sysinfoCpuinfo
|
#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 */
|
/* only to be used test programs, therefore not in sysinfo.h */
|
||||||
extern void virSysinfoSetup(const char *dmidecode, const char *sysinfo,
|
extern void virSysinfoSetup(const char *dmidecode, const char *sysinfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user