From patchwork Wed Aug 4 16:27:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 117081 X-Patchwork-Delegate: ericvh@gmail.com 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 o74GSmYL013478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 4 Aug 2010 16:29:24 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Oggpb-0003e8-Jq; Wed, 04 Aug 2010 16:28:39 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1Oggpa-0003dv-Ke for v9fs-developer@lists.sourceforge.net; Wed, 04 Aug 2010 16:28:38 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.175 as permitted sender) client-ip=74.125.82.175; envelope-from=error27@gmail.com; helo=mail-wy0-f175.google.com; Received: from mail-wy0-f175.google.com ([74.125.82.175]) by sog-mx-4.v43.ch3.sourceforge.com with esmtp (Exim 4.69) id 1OggpW-0006eh-Cp for v9fs-developer@lists.sourceforge.net; Wed, 04 Aug 2010 16:28:38 +0000 Received: by wyb38 with SMTP id 38so7583602wyb.34 for ; Wed, 04 Aug 2010 09:28:28 -0700 (PDT) Received: by 10.227.138.147 with SMTP id a19mr7904161wbu.93.1280939308542; Wed, 04 Aug 2010 09:28:28 -0700 (PDT) Received: from bicker ([41.205.146.22]) by mx.google.com with ESMTPS id l55sm4427894weq.41.2010.08.04.09.28.06 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 04 Aug 2010 09:28:27 -0700 (PDT) Date: Wed, 4 Aug 2010 18:27:45 +0200 From: Dan Carpenter To: Eric Van Hensbergen Message-ID: <20100804162745.GA9031@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Score: 4.9 (++++) 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 (error27[at]gmail.com) 1.2 RCVD_IN_BL_SPAMCOP_NET RBL: Received via a relay in bl.spamcop.net [Blocked - see ] 1.5 RCVD_IN_PSBL RBL: Received via a relay in PSBL [41.205.146.22 listed in psbl.surriel.com] -0.0 SPF_PASS SPF: sender matches SPF record 2.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (error27[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 1.5 SF_NO_SPF_SPAM SF_NO_SPF_SPAM 0.1 AWL AWL: From: address is in the auto white-list X-Headers-End: 1OggpW-0006eh-Cp Cc: Latchesar Ionkov , kernel-janitors@vger.kernel.org, v9fs-developer@lists.sourceforge.net, Ron Minnich Subject: [V9fs-developer] [patch] 9p: potential ERR_PTR() dereference 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: , 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, 04 Aug 2010 16:29:24 +0000 (UTC) diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 3585636..6406f89 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) } kfree(wnames); fid_out: - v9fs_fid_add(dentry, fid); + if (!IS_ERR(fid)) + v9fs_fid_add(dentry, fid); err_out: up_read(&v9ses->rename_sem); return fid;