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 how
many 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 cases
where arbitrary CPUs are offline.
Signed-off-by: Charlie Smurthwaite <charlie(a)atechmedia.com>
---
ext/libvirt/domain.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
and pushed
Jano