From patchwork Mon Feb 8 11:50:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aneesh Kumar K.V" X-Patchwork-Id: 77720 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o18BowJC029130 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 8 Feb 2010 11:51:35 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NeS8i-0006hL-Dk; Mon, 08 Feb 2010 11:50:52 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1NeS8g-0006gv-CZ for v9fs-developer@lists.sourceforge.net; Mon, 08 Feb 2010 11:50:50 +0000 X-ACL-Warn: Received: from e28smtp04.in.ibm.com ([122.248.162.4]) by sfi-mx-3.v28.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1NeS8c-0003Fq-Kd for v9fs-developer@lists.sourceforge.net; Mon, 08 Feb 2010 11:50:49 +0000 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by e28smtp04.in.ibm.com (8.14.3/8.13.1) with ESMTP id o18Boc2V028743 for ; Mon, 8 Feb 2010 17:20:38 +0530 Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o18Boc7x2506906 for ; Mon, 8 Feb 2010 17:20:38 +0530 Received: from d28av01.in.ibm.com (loopback [127.0.0.1]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o18BobHv001547 for ; Mon, 8 Feb 2010 17:20:37 +0530 Received: from localhost.localdomain ([9.124.35.109]) by d28av01.in.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id o18BobX8001536; Mon, 8 Feb 2010 17:20:37 +0530 From: "Aneesh Kumar K.V" To: ericvh@gmail.com Date: Mon, 8 Feb 2010 17:20:32 +0530 Message-Id: <1265629832-2782-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.0.rc2 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1NeS8c-0003Fq-Kd Cc: v9fs-developer@lists.sourceforge.net, "Aneesh Kumar K.V" Subject: [V9fs-developer] [PATCH] 9p: Fix the kernel crash on a failed mount 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 (demeter.kernel.org [140.211.167.41]); Mon, 08 Feb 2010 11:51:36 +0000 (UTC) diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index ea1e3da..85d5057 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c @@ -102,7 +102,8 @@ static void p9_virtio_close(struct p9_client *client) struct virtio_chan *chan = client->trans; mutex_lock(&virtio_9p_lock); - chan->inuse = false; + if (chan) + chan->inuse = false; mutex_unlock(&virtio_9p_lock); }