On Thu, Feb 20, 2020 at 11:01:32AM +0000, Charlie Smurthwaite wrote:
This patch fixes a bug in which only enough memory for one cpumap is allocated for virDomainGetVcpus instead of one per virtual CPU. This Fixes an overflow.Additionally, it uses the return value of virDomainGetVcpus to determine howmany cpuinfo structs were actually populated rather than assuming they all are. Finally, it uses the logical CPU number from the cpuinfo struct in the retrurn data instead of assuming CPU numbers are sequential. This should handle caseswhere arbitrary CPUs are offline. Signed-off-by: Charlie Smurthwaite <charlie@xxxxxxxxxxxxxx> --- ext/libvirt/domain.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko@xxxxxxxxxx> and pushed Jano
Attachment:
signature.asc
Description: PGP signature