linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Linux Memory Management <linux-mm@kvack.org>
Cc: Andrew Morton <akpm@osdl.org>, Dave Airlie <airlied@gmail.com>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Nick Piggin <npiggin@suse.de>,
	thomas@tungstengraphics.com
Subject: [patch 1/7] mm: debug check for the fault vs invalidate race
Date: Sat, 13 Jan 2007 04:27:51 +0100 (CET)	[thread overview]
Message-ID: <20070113011536.9479.46456.sendpatchset@linux.site> (raw)
In-Reply-To: <20070113011526.9479.79596.sendpatchset@linux.site>

Add a bugcheck for Andrea's pagefault vs invalidate race. This is triggerable
for both linear and nonlinear pages with a userspace test harness (using
direct IO and truncate, respectively).

Signed-off-by: Nick Piggin <npiggin@suse.de>

Index: linux-2.6/mm/filemap.c
===================================================================
--- linux-2.6.orig/mm/filemap.c
+++ linux-2.6/mm/filemap.c
@@ -120,6 +120,8 @@ void __remove_from_page_cache(struct pag
 	page->mapping = NULL;
 	mapping->nrpages--;
 	__dec_zone_page_state(page, NR_FILE_PAGES);
+
+	BUG_ON(page_mapped(page));
 }
 
 void remove_from_page_cache(struct page *page)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-01-13  3:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-13  3:27 [patch 0/7] fault vs truncate/invalidate race fix Nick Piggin
2007-01-13  3:27 ` Nick Piggin [this message]
2007-01-13  3:28 ` [patch 2/7] mm: simplify filemap_nopage Nick Piggin
2007-01-13  3:28 ` [patch 3/7] mm: fix fault vs invalidate race for linear mappings Nick Piggin
2007-01-13  3:28 ` [patch 4/7] mm: merge populate and nopage into fault (fixes nonlinear) Nick Piggin
2007-01-13  3:28 ` [patch 5/7] mm: add vm_insert_pfn Nick Piggin
2007-01-13  3:28 ` [patch 6/7] mm: merge nopfn into fault Nick Piggin
2007-01-13  3:29 ` [patch 7/7] mm: remove legacy cruft Nick Piggin

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=20070113011536.9479.46456.sendpatchset@linux.site \
    --to=npiggin@suse.de \
    --cc=airlied@gmail.com \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=thomas@tungstengraphics.com \
    /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).