Re: [ruby PATCH] Fix cpumap allocation for virDomainGetVcpus and use return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux