mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Layton <jeff.layton@primarydata.com>
To: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<bfields@fieldses.org>, <viro@zeniv.linux.org.uk>
Subject: Re: [PATCH] locks: fix fasync_struct memory leak in lease upgrade/downgrade handling
Date: Thu, 5 Mar 2015 06:50:40 -0500	[thread overview]
Message-ID: <20150305065040.60635dfa@tlielax.poochiereds.net> (raw)
In-Reply-To: <54F7FE45.5000100@bmw-carit.de>

On Thu, 5 Mar 2015 07:57:09 +0100
Daniel Wagner <daniel.wagner@bmw-carit.de> wrote:

> Hi Jeff,
> 
> On 03/05/2015 01:06 AM, Jeff Layton wrote:
> > Commit 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
> > introduced a regression in the handling of lease upgrade/downgrades.
> > 
> > In the event that we already have a lease on a file and are going to
> > either upgrade or downgrade it, we skip doing any list insertion or
> > deletion and skip to re-calling lm_setup on the existing lease.
> > 
> > As of commit 8634b51f6ca2 however, we end up calling lm_setup on the
> > lease that was passed in, instead of on the existing lease. This causes
> > us to leak the fasync_struct that was allocated in the event that there
> > was not already an existing one (as it always appeared that there
> > wasn't one).
> > 
> > Fixes: 8634b51f6ca2 (locks: convert lease handling to file_lock_context)
> 
> Yes, that fixes the problem. Thanks!
> 
> > Reported-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> > Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
> 
> Tested-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
> 
> 
> cheers,
> daniel

Thanks for testing it! I'll let it soak in linux-next for a day or so
and then send a pull request to Linus.

Cheers!
-- 
Jeff Layton <jeff.layton@primarydata.com>

      reply	other threads:[~2015-03-05 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-05  0:06 Jeff Layton
2015-03-05  6:57 ` Daniel Wagner
2015-03-05 11:50   ` Jeff Layton [this message]

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=20150305065040.60635dfa@tlielax.poochiereds.net \
    --to=jeff.layton@primarydata.com \
    --cc=bfields@fieldses.org \
    --cc=daniel.wagner@bmw-carit.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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

all inboxes | Powered by JetHome®