From: "J. Bruce Fields" <bfields@fieldses.org>
To: Oleg Drokin <Oleg.Drokin@Sun.COM>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Leak in nlmsvc_testlock for async GETFL case
Date: Mon, 14 Jan 2008 15:44:19 -0500 [thread overview]
Message-ID: <20080114204419.GD16926@fieldses.org> (raw)
In-Reply-To: <71BCABE5-52AD-4573-8DC0-5C57152A397B@Sun.COM>
On Fri, Jan 11, 2008 at 09:57:35PM -0500, Oleg Drokin wrote:
> 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@linuxhacker.ru>
Thanks! I've queued it up for 2.6.25.
--b.
next prev parent reply other threads:[~2008-01-14 20:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-29 18:46 Leak in nlmsvc_testlock for async GETFL case Oleg Drokin
2007-11-29 19:08 ` J. Bruce Fields
2008-01-12 2:57 ` Oleg Drokin
2008-01-14 20:44 ` J. Bruce Fields [this message]
2008-01-15 4:26 ` Matthew Wilcox
2008-01-15 4:28 ` file locks: Use wait_event_interruptible_timeout() Matthew Wilcox
2008-01-15 14:48 ` J. Bruce Fields
2008-01-15 15:04 ` Matthew Wilcox
2008-01-15 18:54 ` J. Bruce Fields
2008-01-15 4:29 ` file locks: Split flock_find_conflict out of flock_lock_file Matthew Wilcox
2008-01-15 18:50 ` J. Bruce Fields
2008-01-15 14:42 ` Leak in nlmsvc_testlock for async GETFL case J. Bruce Fields
2007-12-03 17:00 ` Felix Blyakher
2007-12-03 17:49 ` Oleg Drokin
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=20080114204419.GD16926@fieldses.org \
--to=bfields@fieldses.org \
--cc=Oleg.Drokin@Sun.COM \
--cc=linux-fsdevel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.