qemu-devel
[Top][All Lists]
Advanced

[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>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]