From: Christoph Lameter <clameter@sgi.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, Hugh Dickins <hugh@veritas.com>
Subject: Re: Race in pagevec_strip?
Date: Thu, 16 Mar 2006 11:49:03 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0603161147590.2704@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.61.0603161934220.24837@goblin.wat.veritas.com>
On Thu, 16 Mar 2006, Hugh Dickins wrote:
> But wouldn't you, on balance, be better off repeating the
> PagePrivate test within the lock?
Good idea. That avoid uselessly taking the pagelock.
Seems that we can call try_to_release_page with PagePrivate off and a
valid mapping because we check PagePrivate before taking the page lock.
This may cause all sorts of trouble for thefilesystem *_releasepage()
handlers. XFS bombs out in that case.
Check the PagePrivate again before calling try_to_release_page.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.16-rc6/mm/swap.c
===================================================================
--- linux-2.6.16-rc6.orig/mm/swap.c 2006-03-11 14:12:55.000000000 -0800
+++ linux-2.6.16-rc6/mm/swap.c 2006-03-16 11:46:54.000000000 -0800
@@ -393,7 +393,8 @@ void pagevec_strip(struct pagevec *pvec)
struct page *page = pvec->pages[i];
if (PagePrivate(page) && !TestSetPageLocked(page)) {
- try_to_release_page(page, 0);
+ if (PagePrivate(page))
+ try_to_release_page(page, 0);
unlock_page(page);
}
}
next prev parent reply other threads:[~2006-03-16 19:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-16 18:36 Christoph Lameter
2006-03-16 18:57 ` Christoph Lameter
2006-03-16 19:44 ` Hugh Dickins
2006-03-16 19:49 ` Christoph Lameter [this message]
2006-03-16 20:02 ` Hugh Dickins
2006-03-17 0:50 ` Christoph Lameter
2006-03-17 18:05 ` Hugh Dickins
2006-03-17 18:11 ` Christoph Lameter
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=Pine.LNX.4.64.0603161147590.2704@schroedinger.engr.sgi.com \
--to=clameter@sgi.com \
--cc=akpm@osdl.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@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 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®