Re: nfsdv4 leaks file descriptors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--b.

commit 21cd8aaf5efb086361cf12f9245c14a3b19fbafd
Author: J. Bruce Fields <bfields@xxxxxxxxxx>
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@xxxxxxxxx>
    Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>

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;
 	}
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux