Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263158AbUC2WvO (ORCPT ); Mon, 29 Mar 2004 17:51:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263177AbUC2WvO (ORCPT ); Mon, 29 Mar 2004 17:51:14 -0500 Received: from ppp-217-133-42-200.cust-adsl.tiscali.it ([217.133.42.200]:46234 "EHLO dualathlon.random") by vger.kernel.org with ESMTP id S263158AbUC2Wu6 (ORCPT ); Mon, 29 Mar 2004 17:50:58 -0500 Date: Tue, 30 Mar 2004 00:50:57 +0200 From: Andrea Arcangeli To: Rajesh Venkatasubramanian Cc: Hugh Dickins , akpm@osdl.org, linux-kernel@vger.kernel.org Subject: Re: 2.6.5-rc2-aa5 Message-ID: <20040329225057.GM3808@dualathlon.random> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-GPG-Key: 1024D/68B9CB43 13D9 8355 295F 4823 7C49 C012 DFA1 686E 68B9 CB43 X-PGP-Key: 1024R/CB4660B9 CC A0 71 81 F4 A0 63 AC C0 4B 81 1D 8C 15 C8 E5 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1816 Lines: 49 On Mon, Mar 29, 2004 at 04:30:51PM -0500, Rajesh Venkatasubramanian wrote: > > Andrew Moroton wrote: > >> Andrea Arcangeli wrote: > >> > >> Notably there is a BUG_ON(page->mapping) triggering in > >> page_remove_rmap in the pagecache case. that could be ex-pagecache > >> being > >> removed from pagecache before all ptes have been zapped, infact the > >> page_remove_rmap triggers in the vmtruncate path. > > > > Confused. vmtruncate zaps the ptes before removing pages from > > pagecache, > > so I'd expect a non-null ->mapping in page_remove_rmap() is a very > > common > > thing. truncate a file which someone has mmapped and it'll happen every > > time, will it not? > > Andrea missed a not (!) in the BUG_ON. It is BUG_ON(!page->mapping). Yep sorry ;) > > The race Andrea hit _may_ be the mremap vs. vmtruncate race I hit: > > http://marc.theaimsgroup.com/?l=linux-mm&m=107720111303624 > > A first truncate that raced with mremap and left an orphaned pte. > The following truncate tried to clear the orphaned pte, and reached > page_remove_rmap with page->mapping == NULL. > > Yes. It can happen in all 2.4 and 2.6 kernels. ok fine, so my WARN_ON should work. > Hugh has a better fix than mine for the mremap vs. truncate race > in his anobjrmap 7/6 patch. > > http://marc.theaimsgroup.com/?l=linux-kernel&m=107998825716363 > > With prio_tree we have to modify Hugh's fix, though. Hugh are you interested to extract the fix against mainline? The anobjrmap 7/6 is doing most of stuff I don't really need with anon-vma. - 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/