Re: Leak in nlmsvc_testlock for async GETFL case

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

 



Hello!

On Nov 29, 2007, at 2:08 PM, J. Bruce Fields wrote:

On Thu, Nov 29, 2007 at 01:46:04PM -0500, Oleg Drokin wrote:
Hello!

  Per our discussion, I am resending this patch that fixes a leak in
  nlmsvc_testlock.  It is addition to another leak fixing patch you
  already have.  Without the patch, there is a leakage of nlmblock
  structure refcount that holds a reference nlmfile structure, that
  holds a reference to struct file, when async GETFL is used
  (-EINPROGRESS return from file_ops->lock()), and also in some error
  cases
Thanks for the fix! Looks right to me. Yes, somehow I missed this one
when you sent it privately.  Applied and pushed out to
	git://linux-nfs.org/~bfields/linux.git nfs-server-stable
and I'll submit it for 2.6.25.

After playing around that code a bit more, I figured out the leak was not completely fixed by that first patch, the case where there is conflicting
lock passed in by callback still leaks block reference.
This simple incremental fix (against your current tree) takes care of that.

Signed-off-by: Oleg Drokin <green@xxxxxxxxxxxxxx>
I guess there is no way to safely include patches in messages in apple
mail, so the patch is still attached.

Attachment: nlmblock-leak_fix-2-incr.diff
Description: Binary data



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux