From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Piggin Message-Id: <20070113011536.9479.46456.sendpatchset@linux.site> In-Reply-To: <20070113011526.9479.79596.sendpatchset@linux.site> References: <20070113011526.9479.79596.sendpatchset@linux.site> Subject: [patch 1/7] mm: debug check for the fault vs invalidate race Date: Sat, 13 Jan 2007 04:27:51 +0100 (CET) Sender: owner-linux-mm@kvack.org Return-Path: To: Linux Memory Management Cc: Andrew Morton , Dave Airlie , Benjamin Herrenschmidt , Linux Kernel , Nick Piggin , thomas@tungstengraphics.com List-ID: 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 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: email@kvack.org