Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759951AbYFLLYm (ORCPT ); Thu, 12 Jun 2008 07:24:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755101AbYFLLYf (ORCPT ); Thu, 12 Jun 2008 07:24:35 -0400 Received: from fgwmail7.fujitsu.co.jp ([192.51.44.37]:34747 "EHLO fgwmail7.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751388AbYFLLYd (ORCPT ); Thu, 12 Jun 2008 07:24:33 -0400 Date: Thu, 12 Jun 2008 20:20:03 +0900 From: KAMEZAWA Hiroyuki To: Andrew Morton Cc: Kamalesh Babulal , linux-kernel@vger.kernel.org, kernel-testers@vger.kernel.org, linux-mm@kvack.org, Nick Piggin , Andy Whitcroft Subject: Re: [BUG] 2.6.26-rc5-mm3 kernel BUG at mm/filemap.c:575! Message-Id: <20080612202003.db871cac.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20080612015746.172c4b56.akpm@linux-foundation.org> References: <20080611225945.4da7bb7f.akpm@linux-foundation.org> <4850E1E5.90806@linux.vnet.ibm.com> <20080612015746.172c4b56.akpm@linux-foundation.org> Organization: Fujitsu X-Mailer: Sylpheed 2.4.2 (GTK+ 2.10.11; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2048 Lines: 65 On Thu, 12 Jun 2008 01:57:46 -0700 Andrew Morton wrote: > > Call Trace: > > [] truncate_inode_pages_range+0xc5/0x305 > > [] generic_delete_inode+0xc9/0x133 > > [] do_unlinkat+0xf0/0x160 > > [] system_call_after_swapgs+0x7b/0x80 > > > > > > Code: 00 00 48 85 c0 74 0b 48 8b 40 10 48 85 c0 74 02 ff d0 e8 75 ec 32 00 41 5b 31 c0 c3 53 48 89 fb f0 0f ba 37 00 19 c0 85 c0 75 04 <0f> 0b eb fe e8 56 f5 ff ff 48 89 de 48 89 c7 31 d2 5b e9 47 be > > RIP [] unlock_page+0xf/0x26 > > RSP > > ---[ end trace 27b1d01b03af7c12 ]--- > > Another unlock of an unlocked page. Presumably when reclaim hadn't > done anything yet. > > Don't know, sorry. Strange. > at first look, == truncate_inode_pages_range() -> TestSetPageLocked() // -> truncate_complete_page() -> remove_from_page_cache() // makes page->mapping to be NULL. -> clear_page_mlock() -> __clear_page_mlock() -> putback_lru_page() -> unlock_page() // page->mapping is NULL -> unlock_page() //BUG == It seems truncate_complete_page() is bad. == static void truncate_complete_page(struct address_space *mapping, struct page *page) { if (page->mapping != mapping) return; if (PagePrivate(page)) do_invalidatepage(page, 0); cancel_dirty_page(page, PAGE_CACHE_SIZE); remove_from_page_cache(page); -----------------(A) clear_page_mlock(page); -----------------(B) ClearPageUptodate(page); ClearPageMappedToDisk(page); page_cache_release(page); /* pagecache ref */ } == (B) should be called before (A) as invalidate_complete_page() does. Thanks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/