[libvirt] [PATCH 1/7] qemu: process: Fix off-by-one in vcpu order duplicate error message

Peter Krempa pkrempa at redhat.com
Wed Sep 21 11:49:53 UTC 2016


The bitmap indexes for the order duplicate check are shifted to 0 since
vcpu order 0 is not allowed. The error message doesn't need such
treating though.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1370360
---
 src/qemu/qemu_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 1f56883..bd715b1 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -4791,7 +4791,7 @@ qemuProcessValidateHotpluggableVcpus(virDomainDefPtr def)
         if (vcpu->order != 0) {
             if (virBitmapIsBitSet(ordermap, vcpu->order - 1)) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
-                               _("duplicate vcpu order '%u'"), vcpu->order - 1);
+                               _("duplicate vcpu order '%u'"), vcpu->order);
                 goto cleanup;
             }

-- 
2.10.0




More information about the libvir-list mailing list