DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] vhost: fix FD registration to the fdset
@ 2024-06-17 10:13 Maxime Coquelin
  2024-06-17 14:25 ` David Marchand
  0 siblings, 1 reply; 2+ messages in thread
From: Maxime Coquelin @ 2024-06-17 10:13 UTC (permalink / raw)
  To: dev, yux.jiang, david.marchand, chenbox; +Cc: Maxime Coquelin

A missing return statement in fdset_add() was making
the error path to be systematically executed, this patch
adds it back.

Bugzilla ID: 1462
Fixes: 0e38b42bf61c ("vhost: manage FD with epoll")

Reported-by: Jiang Yu <yux.jiang@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
 lib/vhost/fd_man.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/fd_man.c b/lib/vhost/fd_man.c
index 12c0f2c2b3..87a8dc3f3e 100644
--- a/lib/vhost/fd_man.c
+++ b/lib/vhost/fd_man.c
@@ -242,6 +242,7 @@ fdset_add(struct fdset *pfdset, int fd, fd_cb rcb, fd_cb wcb, void *dat)
 		goto out_remove;
 	}
 
+	return 0;
 out_remove:
 	pthread_mutex_lock(&pfdset->fd_mutex);
 	pfdentry = fdset_find_entry_locked(pfdset, fd);
-- 
2.45.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] vhost: fix FD registration to the fdset
  2024-06-17 10:13 [PATCH] vhost: fix FD registration to the fdset Maxime Coquelin
@ 2024-06-17 14:25 ` David Marchand
  0 siblings, 0 replies; 2+ messages in thread
From: David Marchand @ 2024-06-17 14:25 UTC (permalink / raw)
  To: Maxime Coquelin; +Cc: dev, yux.jiang, chenbox

On Mon, Jun 17, 2024 at 12:13 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> A missing return statement in fdset_add() was making
> the error path to be systematically executed, this patch
> adds it back.
>
> Bugzilla ID: 1462
> Fixes: 0e38b42bf61c ("vhost: manage FD with epoll")

It looks like the initial code was better ;-).

>
> Reported-by: Jiang Yu <yux.jiang@intel.com>
> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied directly in main for rc1, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-17 14:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-17 10:13 [PATCH] vhost: fix FD registration to the fdset Maxime Coquelin
2024-06-17 14:25 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).