lkml.org 
[lkml]   [2011]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [105/105] nfsd4: fix oops on lock failure
On Sun, Apr 17, 2011 at 09:10:12AM -0700, Linus Torvalds wrote:
> On Sun, Apr 17, 2011 at 8:03 AM, OGAWA Hirofumi
> <hirofumi@mail.parknet.co.jp> wrote:
> >
> > I'm looking filp leak on recent kernel. Well, anyway,

Does this fix it?

--b.

commit 5152c8a947359758862d4631863e68e83ec01048
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.

Cc: stable@kernel.org
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;
}
}

\
 
 \ /
  Last update: 2011-04-18 17:35    [W:0.094 / U:2.216 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site