From: Gerhard Heift <ml-nfs-linux-20110412-ef47@gheift.de>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: nfsdv4 leaks file descriptors
Date: Wed, 20 Apr 2011 13:08:36 +0200 [thread overview]
Message-ID: <20110420110834.GB11224@gheift> (raw)
In-Reply-To: <20110415223621.GB12254@fieldses.org>
[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]
On Fri, Apr 15, 2011 at 06:36:21PM -0400, J. Bruce Fields wrote:
> On Fri, Apr 15, 2011 at 03:20:30PM +0200, Gerhard Heift wrote:
> > On Thu, Apr 14, 2011 at 03:10:06PM -0400, J. Bruce Fields wrote:
> > > On Thu, Apr 14, 2011 at 07:48:45AM +0200, Gerhard Heift wrote:
> > > > On Wed, Apr 13, 2011 at 05:12:11PM -0400, J. Bruce Fields wrote:
> > > > > On Tue, Apr 12, 2011 at 04:01:50PM +0200, Gerhard Heift wrote:
> > > > > > Hello,
> > > > > >
> > > > > > I have a linux kernel (2.6.38.2, armv5tel) running which exports a
> > > > > > directory with following options:
> > > > >
> > > > > Should be fixed in more recent stable kernel; let me know if not.
> > > >
> > > > An even more recent stable than 2.6.38.2? I just compiled 2.6.39-rc3 and
> > > > there the leak happens too.
> > >
> > > Ugh. OK, investigating.
> >
> > It took me a bit of time, but I located the commit which introduced this
> > behavior: acfdf5c383b38f7f4dddae41b97c97f1ae058f49
>
> Doh--probably we just need this (lightly tested).
>
> Thanks for tracking this down.
This patch works for me. Thanks for fixing it.
> --b.
Regards,
Gerhard
> commit 21cd8aaf5efb086361cf12f9245c14a3b19fbafd
> Author: J. Bruce Fields <bfields@redhat.com>
> Date: Fri Apr 15 18:08:26 2011 -0400
>
> nfsd4: fix struct file leak on delegation
>
> Introduced by acfdf5c383b38f7f4dddae41b97c97f1ae058f49.
>
> Reported-by: Gerhard Heift <ml-nfs-linux-20110412-ef47@gheift.de>
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
>
> 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;
> }
> }
>
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2011-04-20 11:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-12 14:01 nfsdv4 leaks file descriptors Gerhard Heift
2011-04-13 21:12 ` J. Bruce Fields
2011-04-14 5:48 ` Gerhard Heift
2011-04-14 19:10 ` J. Bruce Fields
2011-04-15 13:20 ` Gerhard Heift
2011-04-15 22:36 ` J. Bruce Fields
2011-04-20 11:08 ` Gerhard Heift [this message]
2011-04-20 15:30 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110420110834.GB11224@gheift \
--to=ml-nfs-linux-20110412-ef47@gheift.de \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).