DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: dev@dpdk.org, yux.jiang@intel.com, david.marchand@redhat.com,
	chenbox@nvidia.com
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>
Subject: [PATCH] vhost: fix FD registration to the fdset
Date: Mon, 17 Jun 2024 12:13:34 +0200	[thread overview]
Message-ID: <20240617101334.211756-1-maxime.coquelin@redhat.com> (raw)

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


             reply	other threads:[~2024-06-17 10:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 10:13 Maxime Coquelin [this message]
2024-06-17 14:25 ` David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240617101334.211756-1-maxime.coquelin@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbox@nvidia.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=yux.jiang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).