From: Markus Armbruster Date: Thu, 28 Sep 2023 13:19:46 +0000 (+0200) Subject: migration/rdma: Fix qemu_rdma_broken_ipv6_kernel() to set error X-Git-Tag: v8.2.0-rc0~79^2~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=142bd685ae10e1354b579a92db02c473f57080f0;p=thirdparty%2Fqemu.git migration/rdma: Fix qemu_rdma_broken_ipv6_kernel() to set error qemu_rdma_resolve_host() and qemu_rdma_dest_init() try addresses until they find on that works. If none works, they return the first Error set by qemu_rdma_broken_ipv6_kernel(), or else return a generic one. qemu_rdma_broken_ipv6_kernel() neglects to set an Error when ibv_open_device() fails. If a later address fails differently, we use that Error instead, or else the generic one. Harmless enough, but needs fixing all the same. Signed-off-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20230928132019.2544702-21-armbru@redhat.com> --- diff --git a/migration/rdma.c b/migration/rdma.c index 30e2c817f2f..9c576bdcbaa 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -861,6 +861,8 @@ static int qemu_rdma_broken_ipv6_kernel(struct ibv_context *verbs, Error **errp) if (errno == EPERM) { continue; } else { + error_setg_errno(errp, errno, + "could not open RDMA device context"); return -EINVAL; } }