* [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
@ 2020-10-29 13:43 AlexChen
2020-11-03 16:35 ` Marcel Apfelbaum
0 siblings, 1 reply; 7+ messages in thread
From: AlexChen @ 2020-10-29 13:43 UTC (permalink / raw)
To: yuval.shaia.ml, marcel.apfelbaum, mjt, Laurent Vivier
Cc: qemu-trivial, zhengchuan, QEMU, zhang.zhanghailiang
When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid()
returns 0 and assigns the result to *fd, so We have to check that *fd is 0,
not that fd is 0.
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: AlexChen <alex.chen@huawei.com>
---
contrib/rdmacm-mux/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
index bd82abbad3..771ca01e03 100644
--- a/contrib/rdmacm-mux/main.c
+++ b/contrib/rdmacm-mux/main.c
@@ -186,7 +186,7 @@ static int hash_tbl_search_fd_by_ifid(int *fd, __be64 *gid_ifid)
*fd = _hash_tbl_search_fd_by_ifid(gid_ifid);
pthread_rwlock_unlock(&server.lock);
- if (!fd) {
+ if (!*fd) {
syslog(LOG_WARNING, "Can't find matching for ifid 0x%llx\n", *gid_ifid);
return -ENOENT;
}
--
2.19.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-10-29 13:43 [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid() AlexChen
@ 2020-11-03 16:35 ` Marcel Apfelbaum
2020-11-24 12:13 ` Alex Chen
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Apfelbaum @ 2020-11-03 16:35 UTC (permalink / raw)
To: AlexChen
Cc: zhang.zhanghailiang, qemu-trivial, mjt, QEMU, Yuval Shaia,
zhengchuan, Laurent Vivier
[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]
Hi Alex,
On Thu, Oct 29, 2020 at 3:43 PM AlexChen <alex.chen@huawei.com> wrote:
> When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid()
> returns 0 and assigns the result to *fd, so We have to check that *fd is 0,
> not that fd is 0.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: AlexChen <alex.chen@huawei.com>
> ---
> contrib/rdmacm-mux/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
> index bd82abbad3..771ca01e03 100644
> --- a/contrib/rdmacm-mux/main.c
> +++ b/contrib/rdmacm-mux/main.c
> @@ -186,7 +186,7 @@ static int hash_tbl_search_fd_by_ifid(int *fd, __be64
> *gid_ifid)
> *fd = _hash_tbl_search_fd_by_ifid(gid_ifid);
> pthread_rwlock_unlock(&server.lock);
>
> - if (!fd) {
> + if (!*fd) {
> syslog(LOG_WARNING, "Can't find matching for ifid 0x%llx\n",
> *gid_ifid);
> return -ENOENT;
> }
> --
> 2.19.1
>
>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Thanks for the fix,
Marcel
[-- Attachment #2: Type: text/html, Size: 1779 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-11-03 16:35 ` Marcel Apfelbaum
@ 2020-11-24 12:13 ` Alex Chen
2020-11-24 15:29 ` Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Alex Chen @ 2020-11-24 12:13 UTC (permalink / raw)
To: Marcel Apfelbaum
Cc: zhang.zhanghailiang, qemu-trivial, mjt, QEMU, Yuval Shaia,
zhengchuan, Laurent Vivier
Hi everyone,
Who can help me merge this patch into the master branch? This patch may be need for qemu-5.2
Thanks,
Alex
On 2020/11/4 0:35, Marcel Apfelbaum wrote:
> Hi Alex,
>
> On Thu, Oct 29, 2020 at 3:43 PM AlexChen <alex.chen@huawei.com <mailto:alex.chen@huawei.com>> wrote:
>
> When fd is not found according to ifid, the _hash_tbl_search_fd_by_ifid()
> returns 0 and assigns the result to *fd, so We have to check that *fd is 0,
> not that fd is 0.
>
> Reported-by: Euler Robot <euler.robot@huawei.com <mailto:euler.robot@huawei.com>>
> Signed-off-by: AlexChen <alex.chen@huawei.com <mailto:alex.chen@huawei.com>>
> ---
> contrib/rdmacm-mux/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/rdmacm-mux/main.c b/contrib/rdmacm-mux/main.c
> index bd82abbad3..771ca01e03 100644
> --- a/contrib/rdmacm-mux/main.c
> +++ b/contrib/rdmacm-mux/main.c
> @@ -186,7 +186,7 @@ static int hash_tbl_search_fd_by_ifid(int *fd, __be64 *gid_ifid)
> *fd = _hash_tbl_search_fd_by_ifid(gid_ifid);
> pthread_rwlock_unlock(&server.lock);
>
> - if (!fd) {
> + if (!*fd) {
> syslog(LOG_WARNING, "Can't find matching for ifid 0x%llx\n", *gid_ifid);
> return -ENOENT;
> }
> --
> 2.19.1
>
>
> Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com <mailto:marcel.apfelbaum@gmail.com>>
>
> Thanks for the fix,
> Marcel
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-11-24 12:13 ` Alex Chen
@ 2020-11-24 15:29 ` Peter Maydell
2020-11-25 1:17 ` Alex Chen
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2020-11-24 15:29 UTC (permalink / raw)
To: Alex Chen
Cc: zhanghailiang, QEMU Trivial, Michael Tokarev, Yuval Shaia, QEMU,
zhengchuan, Laurent Vivier
On Tue, 24 Nov 2020 at 12:15, Alex Chen <alex.chen@huawei.com> wrote:
>
> Hi everyone,
>
> Who can help me merge this patch into the master branch? This patch may be need for qemu-5.2
This code has been like this since 2018, so this is not
a regression in 5.2. At this point in the release cycle
(rc3 imminent) I think it's best to just leave it until 6.0.
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-11-24 15:29 ` Peter Maydell
@ 2020-11-25 1:17 ` Alex Chen
2020-11-29 18:35 ` Marcel Apfelbaum
0 siblings, 1 reply; 7+ messages in thread
From: Alex Chen @ 2020-11-25 1:17 UTC (permalink / raw)
To: Peter Maydell
Cc: zhanghailiang, QEMU Trivial, Michael Tokarev, QEMU, Yuval Shaia,
zhengchuan, Laurent Vivier
On 2020/11/24 23:29, Peter Maydell wrote:
> On Tue, 24 Nov 2020 at 12:15, Alex Chen <alex.chen@huawei.com> wrote:
>>
>> Hi everyone,
>>
>> Who can help me merge this patch into the master branch? This patch may be need for qemu-5.2
>
> This code has been like this since 2018, so this is not
> a regression in 5.2. At this point in the release cycle
> (rc3 imminent) I think it's best to just leave it until 6.0.
>
OK, I see.
Thanks
Alex
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-11-25 1:17 ` Alex Chen
@ 2020-11-29 18:35 ` Marcel Apfelbaum
2020-11-30 9:49 ` Alex Chen
0 siblings, 1 reply; 7+ messages in thread
From: Marcel Apfelbaum @ 2020-11-29 18:35 UTC (permalink / raw)
To: Alex Chen
Cc: Peter Maydell, zhanghailiang, QEMU Trivial, Michael Tokarev,
Yuval Shaia, QEMU, zhengchuan, Laurent Vivier
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Hi Alex,
On Wed, Nov 25, 2020 at 3:17 AM Alex Chen <alex.chen@huawei.com> wrote:
> On 2020/11/24 23:29, Peter Maydell wrote:
> > On Tue, 24 Nov 2020 at 12:15, Alex Chen <alex.chen@huawei.com> wrote:
> >>
> >> Hi everyone,
> >>
> >> Who can help me merge this patch into the master branch? This patch may
> be need for qemu-5.2
> >
> > This code has been like this since 2018, so this is not
> > a regression in 5.2. At this point in the release cycle
> > (rc3 imminent) I think it's best to just leave it until 6.0.
> >
>
> OK, I see.
>
>
I will send a pull request as soon as the 6.0 cycle starts.
Thanks,
Marcel
> Thanks
> Alex
>
>
>
>
>
>
[-- Attachment #2: Type: text/html, Size: 1332 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid()
2020-11-29 18:35 ` Marcel Apfelbaum
@ 2020-11-30 9:49 ` Alex Chen
0 siblings, 0 replies; 7+ messages in thread
From: Alex Chen @ 2020-11-30 9:49 UTC (permalink / raw)
To: Marcel Apfelbaum
Cc: Peter Maydell, zhanghailiang, QEMU Trivial, Michael Tokarev,
Yuval Shaia, QEMU, zhengchuan, Laurent Vivier
On 2020/11/30 2:35, Marcel Apfelbaum wrote:
> Hi Alex,
>
> On Wed, Nov 25, 2020 at 3:17 AM Alex Chen <alex.chen@huawei.com <mailto:alex.chen@huawei.com>> wrote:
>
> On 2020/11/24 23:29, Peter Maydell wrote:
> > On Tue, 24 Nov 2020 at 12:15, Alex Chen <alex.chen@huawei.com <mailto:alex.chen@huawei.com>> wrote:
> >>
> >> Hi everyone,
> >>
> >> Who can help me merge this patch into the master branch? This patch may be need for qemu-5.2
> >
> > This code has been like this since 2018, so this is not
> > a regression in 5.2. At this point in the release cycle
> > (rc3 imminent) I think it's best to just leave it until 6.0.
> >
>
> OK, I see.
>
>
> I will send a pull request as soon as the 6.0 cycle starts.
>
Thank you.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-11-30 9:53 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 13:43 [PATCH] contrib/rdmacm-mux: Fix error condition in hash_tbl_search_fd_by_ifid() AlexChen
2020-11-03 16:35 ` Marcel Apfelbaum
2020-11-24 12:13 ` Alex Chen
2020-11-24 15:29 ` Peter Maydell
2020-11-25 1:17 ` Alex Chen
2020-11-29 18:35 ` Marcel Apfelbaum
2020-11-30 9:49 ` Alex Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.