libvirt/SOURCES/libvirt-qemuBackupDiskStarted-Fix-improper-dereference-of-array.patch
2021-10-08 13:11:20 +00:00

39 lines
1.4 KiB
Diff

From 9bec4051732e43d24808893643826268ab88b8cc Mon Sep 17 00:00:00 2001
Message-Id: <9bec4051732e43d24808893643826268ab88b8cc@dist-git>
From: Peter Krempa <pkrempa@redhat.com>
Date: Tue, 23 Jun 2020 12:24:09 +0200
Subject: [PATCH] qemuBackupDiskStarted: Fix improper dereference of array
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The code would repeatedly mark the first disk's blockjob as started
rather than accessing all the blockjobs. Fix the dereferencing operator.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 214faa0b04ace42aebfa40e1d19aabbf3003f0fe)
https://bugzilla.redhat.com/show_bug.cgi?id=1804593
Message-Id: <1d33c3080e24baf96a0d9435d1588b4a48a98425.1592906423.git.pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
---
src/qemu/qemu_backup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qemu/qemu_backup.c b/src/qemu/qemu_backup.c
index 013a82e06d..fdc75d3160 100644
--- a/src/qemu/qemu_backup.c
+++ b/src/qemu/qemu_backup.c
@@ -479,7 +479,7 @@ qemuBackupDiskStarted(virDomainObjPtr vm,
for (i = 0; i < ndd; i++) {
dd[i].started = true;
dd[i].backupdisk->state = VIR_DOMAIN_BACKUP_DISK_STATE_RUNNING;
- qemuBlockJobStarted(dd->blockjob, vm);
+ qemuBlockJobStarted(dd[i].blockjob, vm);
}
}
--
2.27.0