[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failu
From: |
Zhijian Li (Fujitsu) |
Subject: |
Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors |
Date: |
Thu, 21 Sep 2023 09:07:50 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 |
On 18/09/2023 22:41, Markus Armbruster wrote:
> qemu_rdma_accept() returns 0 in some cases even when it didn't
> complete its job due to errors. Impact is not obvious. I figure the
> caller will soon fail again with a misleading error message.
>
> Fix it to return -1 on any failure.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
I noticed that ret initialization is also meaningless in qemu_rdma_accept()
3354 static int qemu_rdma_accept(RDMAContext *rdma)
3355 {
3356 RDMACapabilities cap;
3357 struct rdma_conn_param conn_param = {
3358 .responder_resources = 2,
3359 .private_data = &cap,
3360 .private_data_len =
sizeof(cap),
3361 };
3362 RDMAContext *rdma_return_path = NULL;
3363 struct rdma_cm_event *cm_event;
3364 struct ibv_context *verbs;
3365 int ret = -EINVAL; <<<<< drop it ?
3366 int idx;
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
- Re: [PATCH 18/52] migration/rdma: Fix qemu_rdma_broken_ipv6_kernel() to set error, (continued)
- [PATCH 31/52] migration/rdma: Retire macro ERROR(), Markus Armbruster, 2023/09/18
- [PATCH 44/52] migration/rdma: Silence qemu_rdma_resolve_host(), Markus Armbruster, 2023/09/18
- [PATCH 29/52] migration/rdma: Plug a memory leak and improve a message, Markus Armbruster, 2023/09/18
- [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors, Markus Armbruster, 2023/09/18
- [PATCH 24/52] migration/rdma: Return -1 instead of negative errno code, Markus Armbruster, 2023/09/18
- [PATCH 42/52] migration/rdma: Convert qemu_rdma_post_recv_control() to Error, Markus Armbruster, 2023/09/18
- [PATCH 35/52] migration/rdma: Convert qemu_rdma_exchange_send() to Error, Markus Armbruster, 2023/09/18
- [PATCH 50/52] migration/rdma: Silence qemu_rdma_cleanup(), Markus Armbruster, 2023/09/18