From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UT9Qm-0003WT-JA for qemu-devel@nongnu.org; Fri, 19 Apr 2013 07:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UT9Ql-0000R3-Jv for qemu-devel@nongnu.org; Fri, 19 Apr 2013 07:24:40 -0400 Message-ID: <51712973.3000003@redhat.com> Date: Fri, 19 Apr 2013 13:24:35 +0200 From: Michal Privoznik MIME-Version: 1.0 References: <1366355475-7243-1-git-send-email-jasowang@redhat.com> In-Reply-To: <1366355475-7243-1-git-send-email-jasowang@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] tap: properly initialize vhostfds List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com, qemu-stable@nongnu.org On 19.04.2013 09:11, Jason Wang wrote: > Only tap->vhostfd were checked net_init_tap_one(), but tap->vhostfds were > forgot, this will lead qemu to ignore all fds passed by management through > vhostfds, and tries to create vhost_net device itself. Fix by adding this check > also. > > Reportyed-by: Michal Privoznik Typo > Cc: Michal Privoznik > Cc: qemu-stable@nongnu.org > Signed-off-by: Jason Wang > --- > net/tap.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/net/tap.c b/net/tap.c > index 17bdf01..e0b7a2a 100644 > --- a/net/tap.c > +++ b/net/tap.c > @@ -623,7 +623,7 @@ static int net_init_tap_one(const NetdevTapOptions *tap, NetClientState *peer, > vhostfdname || (tap->has_vhostforce && tap->vhostforce)) { > int vhostfd; > > - if (tap->has_vhostfd) { > + if (tap->has_vhostfd || tap->has_vhostfds) { > vhostfd = monitor_handle_fd_param(cur_mon, vhostfdname); > if (vhostfd == -1) { > return -1; > Yup. I can confirm this fixes the problem for me. Reviewed-by: Michal Privoznik Michal