From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Suresh Jayaraman <sjayaraman@suse.de>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page()
Date: Mon, 08 Feb 2010 09:50:21 -0500 [thread overview]
Message-ID: <1265640621.5235.23.camel@localhost> (raw)
In-Reply-To: <1265635435.5235.4.camel@localhost>
On Mon, 2010-02-08 at 08:23 -0500, Trond Myklebust wrote:
> On Sun, 2010-02-07 at 16:56 +0530, Suresh Jayaraman wrote:
> > There are only two callers for nfs_fscache_release_page() -
> > nfs_release_page() and nfs_migrate_page(). nfs_migrate_page already does
> > this:
> >
> > if (PageFsCache(page))
> > nfs_fscache_release_page(page, GFP_KERNEL);
> >
> > and the assumption in nfs_release_page() is that the page should have
> > either PG_private set or PG_fscache set and nfs_fscache_release_page
> > gets called only if PG_private is not set.
>
> ...or if it gets cleared.
To be more precise, even before we put call to nfs_wb_page() in
nfs_release_page(), it was possible for the PG_private bit to be set
when doing the test in shrink_page_list(), but for an outstanding commit
operation to complete before the second test in nfs_release_page.
In this case, nfs_fscache_release_page would get called with neither
PG_private nor PG_fscache being set, and the Oops could occur.
> > I think the idea is that nfs_fscache_release_page should not get called
> > if fsc option is not used. So it appears to me this patch is fixing the
> > symptom not the actual issue. Perhaps, this the assumption in
> > nfs_release_page is wrong or the PageFsCache() check should be moved to
> > nfs_release_page?
>
> No. We should rather get rid of the redundant check for PageFsCache() in
> nfs_migrate_page. PageFsCache() is particular to fscache, so the test
> belongs in the fscache code.
I've added a cleanup patch (which will not go to stable@kernel.org) to
do this.
Trond
next prev parent reply other threads:[~2010-02-08 14:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-05 22:43 [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Trond Myklebust
2010-02-05 22:43 ` [PATCH 2/2] NFS: Fix the mapping of the NFSERR_SERVERFAULT error Trond Myklebust
2010-02-05 23:12 ` Chuck Lever
2010-02-08 15:12 ` Trond Myklebust
2010-02-07 11:26 ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Suresh Jayaraman
2010-02-08 13:23 ` Trond Myklebust
2010-02-08 14:50 ` Trond Myklebust [this message]
2010-02-08 16:33 ` Suresh Jayaraman
2010-02-08 16:39 ` Trond Myklebust
2010-02-09 6:26 ` Suresh Jayaraman
2010-02-08 14:59 ` [PATCH 0/2] Fix for the nfs_release_page() bug Trond Myklebust
[not found] ` <20100208145942.17581.81775.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-08 14:59 ` [PATCH 2/2] NFS: Remove a redundant check for PageFsCache in nfs_migrate_page() Trond Myklebust
2010-02-08 14:59 ` [PATCH 1/2] NFS: Fix a bug in nfs_fscache_release_page() Trond Myklebust
[not found] ` <20100208145942.17581.83842.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-09 14:53 ` David Howells
[not found] ` <20100208145942.17581.12206.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-09 14:54 ` [PATCH 2/2] NFS: Remove a redundant check for PageFsCache in nfs_migrate_page() David Howells
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=1265640621.5235.23.camel@localhost \
--to=trond.myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=sjayaraman@suse.de \
/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