[libvirt PATCH] qemu: Fix crash at the end of migration

Jiri Denemark posted 1 patch 2 years, 2 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/f106914d0ad0b358c8d850ef71fbe641956d4306.1645087814.git.jdenemar@redhat.com
src/qemu/qemu_migration.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] qemu: Fix crash at the end of migration
Posted by Jiri Denemark 2 years, 2 months ago
The destination daemon would crash in Finish phase due to NULL
dereference which I missed in my review of commit
v8.0.0-428-g0301db44e2.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
---
 src/qemu/qemu_migration.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index fea5e71f4d..5aecdddff0 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -5855,7 +5855,7 @@ qemuMigrationDstFinish(virQEMUDriver *driver,
         if (jobData) {
             priv->job.completed = g_steal_pointer(&jobData);
             priv->job.completed->status = VIR_DOMAIN_JOB_STATUS_COMPLETED;
-            qemuDomainJobSetStatsType(jobData,
+            qemuDomainJobSetStatsType(priv->job.completed,
                                       QEMU_DOMAIN_JOB_STATS_TYPE_MIGRATION);
         }
 
-- 
2.35.1

Re: [libvirt PATCH] qemu: Fix crash at the end of migration
Posted by Ján Tomko 2 years, 2 months ago
On a Thursday in 2022, Jiri Denemark wrote:
>The destination daemon would crash in Finish phase due to NULL
>dereference which I missed in my review of commit
>v8.0.0-428-g0301db44e2.

Please delete the final period after the commit hash.

Alternatively, put it in a Fixes: tag

>
>Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
>---
> src/qemu/qemu_migration.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano