提交 531aef2e 编写于 作者: B Boris Fiuczynski 提交者: Eric Blake

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: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
上级 af5c3a10
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册