From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail202.messagelabs.com (mail202.messagelabs.com [216.82.254.227]) by kanga.kvack.org (Postfix) with ESMTP id EEBB86B01F0 for ; Sat, 28 Aug 2010 06:17:13 -0400 (EDT) Subject: Re: [PATCH] mm: fix hang on anon_vma->root->lock From: Peter Zijlstra In-Reply-To: References: <20100826235052.GZ6803@random.random> <20100827095546.GC6803@random.random> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 28 Aug 2010 12:17:06 +0200 Message-ID: <1282990626.1975.3270.camel@laptop> Mime-Version: 1.0 Sender: owner-linux-mm@kvack.org To: Christoph Lameter Cc: Hugh Dickins , Naoya Horiguchi , Andrea Arcangeli , Linus Torvalds , Andrew Morton , Rik van Riel , linux-kernel@vger.kernel.org, linux-mm@kvack.org List-ID: On Fri, 2010-08-27 at 21:47 -0500, Christoph Lameter wrote: >=20 > I'd be much more comfortable if the following would be done >=20 > A. Pin the anon_vma by either > I. Take a refcount on the anon vma My preemptible mmu patches do that.. > II. Take a lock in the anon vma (something that is not pointed to= ) >=20 > B. Either > I. All values that have been used before the pinning are > verified after the pinning (and the lock is reacquired > if verification fails). >=20 > II. Or all functions using page_lock_anon_vma() must securely > work in the case that the anon_vma was reused for > something else before the vma lock was acquired. Last time I looked they all work like that, they all use something akin to vma_address() which validates that the page we're interested in is indeed part of the vma we obtained from the rmap chain. Anyway, I'll try and refresh my preemptible mmu patch-set now that the merge window dust settled and post if again, hopefully we can stick it in -next. -- 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