From patchwork Sun Sep 26 15:28:13 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 288112 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o9SI4Ul5032693 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 28 Oct 2010 18:04:52 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1PBWph-00012i-4r; Thu, 28 Oct 2010 18:04:13 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1P0Lsw-0002k2-78 for v9fs-developer@lists.sourceforge.net; Mon, 27 Sep 2010 22:09:22 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of gmx.de designates 213.165.64.22 as permitted sender) client-ip=213.165.64.22; envelope-from=sven.eckelmann@gmx.de; helo=mail.gmx.net; Received: from mailout-de.gmx.net ([213.165.64.22] helo=mail.gmx.net) by sog-mx-2.v43.ch3.sourceforge.com with smtp (Exim 4.69) id 1P0Lsu-0000dw-U9 for v9fs-developer@lists.sourceforge.net; Mon, 27 Sep 2010 22:09:22 +0000 Received: (qmail invoked by alias); 27 Sep 2010 22:09:14 -0000 Received: from vpnclient-202-021.hrz.tu-chemnitz.de (EHLO sven-desktop.lazhur.ath.cx) [134.109.202.21] by mail.gmx.net (mp012) with SMTP; 28 Sep 2010 00:09:14 +0200 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX1/6E54w8RT64x2pRf9mn3qwUn7k7BWb+kvmfNfn0U cvXpJ2r3wCxFJ6 From: Sven Eckelmann Date: Sun, 26 Sep 2010 17:28:13 +0200 Message-ID: <1285514893-11233-1-git-send-email-sven.eckelmann@gmx.de> To: ericvh@gmail.com X-Y-GMX-Trusted: 0 X-Spam-Score: -1.0 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is freemail (sven.eckelmann[at]gmx.de) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [213.165.64.22 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.5 DATE_IN_PAST_24_48 Date: is 24 to 48 hours before Received: date 0.0 T_TO_NO_BRKTS_FREEMAIL T_TO_NO_BRKTS_FREEMAIL X-Headers-End: 1P0Lsu-0000dw-U9 X-Mailman-Approved-At: Thu, 28 Oct 2010 18:04:10 +0000 Cc: Sven Eckelmann , netdev@vger.kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org Subject: [V9fs-developer] [PATCH] net/9p: Mount only matching virtio channels X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Oct 2010 18:04:52 +0000 (UTC) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index dcfbe99..b885159 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -329,7 +329,8 @@ p9_virtio_create(struct p9_client *client, const char *devname, char *args) mutex_lock(&virtio_9p_lock); list_for_each_entry(chan, &virtio_chan_list, chan_list) { - if (!strncmp(devname, chan->tag, chan->tag_len)) { + if (!strncmp(devname, chan->tag, chan->tag_len) && + strlen(devname) == chan->tag_len) { if (!chan->inuse) { chan->inuse = true; found = 1;