[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: |
Markus Armbruster |
Subject: |
Re: [PATCH 08/52] migration/rdma: Fix qemu_rdma_accept() to return failure on errors |
Date: |
Thu, 28 Sep 2023 12:53:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
"Zhijian Li (Fujitsu)" <lizhijian@fujitsu.com> writes:
> 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;
PATCH 27 will drop it.
> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Thanks!
- 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