From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robin Holt Subject: [ofa-general] Re: [PATCH 08 of 11] anon-vma-rwsem Date: Wed, 7 May 2008 19:52:56 -0500 Message-ID: <20080508005256.GB9878@sgi.com> References: <20080507212650.GA8276@duo.random> <20080507222205.GC8276@duo.random> <20080507153103.237ea5b6.akpm@linux-foundation.org> <20080507224406.GI8276@duo.random> <20080507155914.d7790069.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: avi@qumranet.com, linux-mm@kvack.org, hugh@veritas.com, npiggin@suse.de, kvm-devel@lists.sourceforge.net, rdreier@cisco.com, dada1@cosmosbay.com, general@lists.openfabrics.org, Christoph Lameter , steiner@sgi.com, Andrea Arcangeli , a.p.zijlstra@chello.nl, rusty@rustcorp.com.au, chrisw@redhat.com, aliguori@us.ibm.com, marcelo@kvack.org, kanojsarcar@yahoo.com, linux-kernel@vger.kernel.org, paulmck@us.ibm.com, holt@sgi.com, Andrew Morton To: Linus Torvalds Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: general-bounces@lists.openfabrics.org Errors-To: general-bounces@lists.openfabrics.org List-Id: kvm.vger.kernel.org On Wed, May 07, 2008 at 05:03:30PM -0700, Linus Torvalds wrote: > > > On Wed, 7 May 2008, Christoph Lameter wrote: > > > > Multiple vmas may share the same mapping or refer to the same anonymous > > vma. The above code will deadlock since we may take some locks multiple > > times. > > Ok, so that actually _is_ a problem. It would be easy enough to also add > just a flag to the vma (VM_MULTILOCKED), which is still cleaner than doing > a vmalloc and a whole sort thing, but if this is really rare, maybe Ben's > suggestion of just using stop-machine is actually the right one just > because it's _so_ simple. Also, stop-machine will not work if we come to the conclusion that i_mmap_lock and anon_vma->lock need to be sleepable locks. Thanks, Robin Holt