linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "J. Bruce Fields" <bfields@redhat.com>, Greg KH <gregkh@suse.de>,
	linux-kernel@vger.kernel.org, stable@kernel.org,
	akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
	Neil Brown <neilb@suse.de>,
	linux-nfs@vger.kernel.org
Subject: Re: [105/105] nfsd4: fix oops on lock failure
Date: Sun, 17 Apr 2011 09:10:12 -0700	[thread overview]
Message-ID: <BANLkTimN6L80e_oiJ_uqbLde2Cdnw5p45Q@mail.gmail.com> (raw)
In-Reply-To: <87pqokx6lr.fsf@devron.myhome.or.jp>

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,
> 23fcf2ec93fb8573a653408316af599939ff9a8e is strange, and I think it can
> be one of causes.

Hmm. Your patch looks correct to me. Added Neil and linux-nfs.

Bruce? Neil?

               Linus

---
> [PATCH] nfsd4: Fix filp leak
>
> 23fcf2ec93fb8573a653408316af599939ff9a8e (nfsd4: fix oops on lock failure)
>
> The above patch breaks free path for stp->st_file. If stp was inserted
> into sop->so_stateids, we have to free stp->st_file refcount. Because
> stp->st_file refcount itself is taken unrelated to stp->st_file->fi_fds[].
>
> Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
>
>  fs/nfsd/nfs4state.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN fs/nfsd/nfs4state.c~nfsd4-filp-leak-fix fs/nfsd/nfs4state.c
> --- linux-2.6/fs/nfsd/nfs4state.c~nfsd4-filp-leak-fix   2011-04-17 20:45:45.000000000 +0900
> +++ linux-2.6-hirofumi/fs/nfsd/nfs4state.c      2011-04-17 20:59:53.000000000 +0900
> @@ -402,8 +402,8 @@ static void free_generic_stateid(struct
>        if (stp->st_access_bmap) {
>                oflag = nfs4_access_bmap_to_omode(stp);
>                nfs4_file_put_access(stp->st_file, oflag);
> -               put_nfs4_file(stp->st_file);
>        }
> +       put_nfs4_file(stp->st_file);
>        kmem_cache_free(stateid_slab, stp);
>  }
>
> _
> --
> OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
>

       reply	other threads:[~2011-04-17 16:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110412143559.186613198@clark.kroah.org>
     [not found] ` <87pqokx6lr.fsf@devron.myhome.or.jp>
2011-04-17 16:10   ` Linus Torvalds [this message]
2011-04-18 15:32     ` [105/105] nfsd4: fix oops on lock failure J. Bruce Fields
2011-04-18 15:42       ` J. Bruce Fields
2011-04-18 16:08       ` OGAWA Hirofumi
2011-04-18 16:10         ` OGAWA Hirofumi
2011-04-18 16:39           ` OGAWA Hirofumi
2011-04-18 16:59             ` Linus Torvalds
2011-04-18 17:16               ` J. Bruce Fields
2011-04-18 18:21                 ` [stable] " Greg KH
2011-04-18 21:12             ` OGAWA Hirofumi
2011-04-19  8:21               ` OGAWA Hirofumi
2011-04-19 20:43                 ` J. Bruce Fields
2011-04-19 21:17                   ` OGAWA Hirofumi
     [not found]                     ` <87aafmgcvk.fsf-x/W9pkDDSe1TgC2z9Sl/nXf5DAMn2ifp@public.gmane.org>
2011-04-19 21:33                       ` J. Bruce Fields
2011-04-20 23:23                         ` nfsd bugfixes for 2.6.39 J. Bruce Fields

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=BANLkTimN6L80e_oiJ_uqbLde2Cdnw5p45Q@mail.gmail.com \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=bfields@redhat.com \
    --cc=gregkh@suse.de \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).