From patchwork Mon Apr 18 15:32:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Fields X-Patchwork-Id: 715831 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3IFX7Wf030156 for ; Mon, 18 Apr 2011 15:33:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754214Ab1DRPdG (ORCPT ); Mon, 18 Apr 2011 11:33:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37586 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754157Ab1DRPdE (ORCPT ); Mon, 18 Apr 2011 11:33:04 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3IFWmhX014469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 18 Apr 2011 11:32:48 -0400 Received: from pad.home.fieldses.org (vpn-9-163.rdu.redhat.com [10.11.9.163]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3IFWjpb032641; Mon, 18 Apr 2011 11:32:46 -0400 Received: by pad.home.fieldses.org (Postfix, from userid 2815) id E9A4F7210C3; Mon, 18 Apr 2011 11:32:38 -0400 (EDT) Date: Mon, 18 Apr 2011 11:32:38 -0400 From: "J. Bruce Fields" To: Linus Torvalds Cc: OGAWA Hirofumi , Greg KH , linux-kernel@vger.kernel.org, stable@kernel.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Neil Brown , linux-nfs@vger.kernel.org Subject: Re: [105/105] nfsd4: fix oops on lock failure Message-ID: <20110418153236.GC20935@pad.home.fieldses.org> References: <20110412143559.186613198@clark.kroah.org> <87pqokx6lr.fsf@devron.myhome.or.jp> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 18 Apr 2011 15:33:08 +0000 (UTC) On Sun, Apr 17, 2011 at 09:10:12AM -0700, Linus Torvalds wrote: > On Sun, Apr 17, 2011 at 8:03 AM, OGAWA Hirofumi > wrote: > > > > I'm looking filp leak on recent kernel. Well, anyway, Does this fix it? --b. commit 5152c8a947359758862d4631863e68e83ec01048 Author: J. Bruce Fields Date: Fri Apr 15 18:08:26 2011 -0400 nfsd4: fix struct file leak on delegation Introduced by acfdf5c383b38f7f4dddae41b97c97f1ae058f49. Cc: stable@kernel.org Reported-by: Gerhard Heift Signed-off-by: J. Bruce Fields --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index aa309aa..c79a983 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -258,6 +258,7 @@ static void nfs4_put_deleg_lease(struct nfs4_file *fp) if (atomic_dec_and_test(&fp->fi_delegees)) { vfs_setlease(fp->fi_deleg_file, F_UNLCK, &fp->fi_lease); fp->fi_lease = NULL; + fput(fp->fi_deleg_file); fp->fi_deleg_file = NULL; } }