From patchwork Tue Dec 22 18:18:28 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wright X-Patchwork-Id: 69313 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id nBMIJNpa012764 for ; Tue, 22 Dec 2009 18:19:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbZLVSTI (ORCPT ); Tue, 22 Dec 2009 13:19:08 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754254AbZLVSTH (ORCPT ); Tue, 22 Dec 2009 13:19:07 -0500 Received: from sous-sol.org ([216.99.217.87]:53391 "EHLO sequoia.sous-sol.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751310AbZLVSTG (ORCPT ); Tue, 22 Dec 2009 13:19:06 -0500 Received: from sequoia.sous-sol.org (sequoia.sous-sol.org [127.0.0.1]) by sequoia.sous-sol.org (8.14.3/8.14.3) with ESMTP id nBMIIT4J004374; Tue, 22 Dec 2009 10:18:29 -0800 Received: (from chrisw@localhost) by sequoia.sous-sol.org (8.14.3/8.14.3/Submit) id nBMIISOV004371; Tue, 22 Dec 2009 10:18:28 -0800 Date: Tue, 22 Dec 2009 10:18:28 -0800 From: Chris Wright To: "Michael S. Tsirkin" Cc: rusty@rustcorp.com.au, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [PATCH] vhost-net: comment use of invalid fd when setting vhost backend Message-ID: <20091222181828.GA2095@sequoia.sous-sol.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: clamav-milter 0.95.2 at sequoia.sous-sol.org X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sequoia.sous-sol.org Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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);