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 for S390 to 64KB. Signed-off-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxxxxxxx> --- src/util/virsysinfo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 1bb6392..613bab9 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -377,6 +377,8 @@ virSysinfoRead(void) # pragma GCC diagnostic ignored "-Wlogical-op" # endif +# define S390_CPUINFO_FILE_LEN (64*1024) /* 64KB limit for /proc/cpuinfo file */ + static char * virSysinfoParseDelimited(const char *base, const char *name, char **value, char delim1, char delim2) @@ -471,7 +473,7 @@ virSysinfoRead(void) goto no_memory; /* Gather info from /proc/cpuinfo */ - if (virFileReadAll(CPUINFO, CPUINFO_FILE_LEN, &outbuf) < 0) { + if (virFileReadAll(CPUINFO, S390_CPUINFO_FILE_LEN, &outbuf) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, _("Failed to open %s"), CPUINFO); return NULL; -- 1.9.3 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list