From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael S. Tsirkin" Subject: Re: [PATCH] vhost-net: comment use of invalid fd when setting vhost backend Date: Tue, 22 Dec 2009 21:37:49 +0200 Message-ID: <20091222193749.GA20454@redhat.com> References: <20091222181828.GA2095@sequoia.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: rusty@rustcorp.com.au, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org To: Chris Wright Return-path: Received: from mx1.redhat.com ([209.132.183.28]:22543 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754196AbZLVTkr (ORCPT ); Tue, 22 Dec 2009 14:40:47 -0500 Content-Disposition: inline In-Reply-To: <20091222181828.GA2095@sequoia.sous-sol.org> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Dec 22, 2009 at 10:18:28AM -0800, Chris Wright wrote: > This looks like an error case, but it's just a special case to shutdown > the backend. Clarify with a comment. > > Signed-off-by: Chris Wright Acked-by: Michael S. Tsirkin > --- > drivers/vhost/net.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c > index 22d5fef..cc92086 100644 > --- a/drivers/vhost/net.c > +++ b/drivers/vhost/net.c > @@ -465,6 +465,7 @@ static struct socket *get_tun_socket(int fd) > static struct socket *get_socket(int fd) > { > struct socket *sock; > + /* special case to disable backend */ > if (fd == -1) > return NULL; > sock = get_raw_socket(fd);