From patchwork Wed Aug 25 16:27:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jvrao X-Patchwork-Id: 132601 Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o7PGI0kT026432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 25 Aug 2010 16:18:38 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 1OoIfj-0003re-Hl; Wed, 25 Aug 2010 16:17:55 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OoIfi-0003rZ-HW for v9fs-developer@lists.sourceforge.net; Wed, 25 Aug 2010 16:17:54 +0000 X-ACL-Warn: Received: from e4.ny.us.ibm.com ([32.97.182.144]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) id 1OoIfh-0007Ip-KE for v9fs-developer@lists.sourceforge.net; Wed, 25 Aug 2010 16:17:54 +0000 Received: from d01relay02.pok.ibm.com (d01relay02.pok.ibm.com [9.56.227.234]) by e4.ny.us.ibm.com (8.14.4/8.13.1) with ESMTP id o7PG2unS012705 for ; Wed, 25 Aug 2010 12:02:56 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay02.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o7PGHlAQ367836 for ; Wed, 25 Aug 2010 12:17:47 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id o7PGHket023054 for ; Wed, 25 Aug 2010 10:17:47 -0600 Received: from localhost.localdomain (elm9m80.beaverton.ibm.com [9.47.81.80]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id o7PGHkd5023018; Wed, 25 Aug 2010 10:17:46 -0600 From: "Venkateswararao Jujjuri (JV)" To: v9fs-developer@lists.sourceforge.net Date: Wed, 25 Aug 2010 09:27:06 -0700 Message-Id: <1282753626-28268-1-git-send-email-jvrao@linux.vnet.ibm.com> X-Mailer: git-send-email 1.6.0.6 X-Spam-Score: -0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1OoIfh-0007Ip-KE Cc: linux-fsdevel@vger.kernel.org Subject: [V9fs-developer] [PATCH] [net/9p] Add a Warning to catch NULL fids passed to p9_client_clunk(). 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]); Wed, 25 Aug 2010 16:18:39 +0000 (UTC) diff --git a/net/9p/client.c b/net/9p/client.c index dc6f2f2..aa7be29 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1201,6 +1201,12 @@ int p9_client_clunk(struct p9_fid *fid) struct p9_client *clnt; struct p9_req_t *req; + if (!fid) { + P9_EPRINTK(KERN_WARNING, "Trying to clunk with NULL fid\n"); + dump_stack(); + return 0; + } + P9_DPRINTK(P9_DEBUG_9P, ">>> TCLUNK fid %d\n", fid->fid); err = 0; clnt = fid->clnt;