[libvirt] [PATCH 01/35] qemu: Fix possible crash in qemuProcessSetVcpuAffinities

Martin Kletzander mkletzan at redhat.com
Mon Jun 1 09:45:27 UTC 2015


On Fri, May 29, 2015 at 03:33:22PM +0200, Peter Krempa wrote:
>In case when <vcpu ... cpuset=""> is not specified, the vcpupin array is
>not guaranteed to be allocated to def->vcpus. This would cause a crash
>for TCG since it does not report thread IDs for vCPUs.
>---
> src/qemu/qemu_process.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

ACK

>diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
>index 9c5d0f4..f2b2229 100644
>--- a/src/qemu/qemu_process.c
>+++ b/src/qemu/qemu_process.c
>@@ -2376,7 +2376,7 @@ qemuProcessSetVcpuAffinities(virDomainObjPtr vm)
>         /* If any CPU has custom affinity that differs from the
>          * VM default affinity, we must reject it
>          */
>-        for (n = 0; n < def->vcpus; n++) {
>+        for (n = 0; n < def->cputune.nvcpupin; n++) {
>             if (!virBitmapEqual(def->cpumask,
>                                 def->cputune.vcpupin[n]->cpumask)) {
>                 virReportError(VIR_ERR_OPERATION_INVALID,
>--
>2.4.1
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150601/22552e2c/attachment-0001.sig>


More information about the libvir-list mailing list