Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754963Ab3I1Tq4 (ORCPT ); Sat, 28 Sep 2013 15:46:56 -0400 Received: from mail-ee0-f45.google.com ([74.125.83.45]:50979 "EHLO mail-ee0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479Ab3I1Tqx (ORCPT ); Sat, 28 Sep 2013 15:46:53 -0400 Date: Sat, 28 Sep 2013 21:46:49 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Waiman Long , Ingo Molnar , Andrew Morton , Linux Kernel Mailing List , Rik van Riel , Peter Hurley , Davidlohr Bueso , Alex Shi , Tim Chen , Peter Zijlstra , Andrea Arcangeli , Matthew R Wilcox , Dave Hansen , Michel Lespinasse , Andi Kleen , "Chandramouleeswaran, Aswin" , "Norton, Scott J" Subject: Re: [PATCH] anon_vmas: Convert the rwsem to an rwlock_t Message-ID: <20130928194649.GB8640@gmail.com> References: <1380308424-31011-1-git-send-email-Waiman.Long@hp.com> <20130928074144.GA17773@gmail.com> <20130928192123.GA8228@gmail.com> <20130928193739.GA8642@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1284 Lines: 33 * Linus Torvalds wrote: > On Sat, Sep 28, 2013 at 12:37 PM, Ingo Molnar wrote: > > > > - down_write_nest_lock(&anon_vma->root->rwsem, &mm->mmap_sem); > > + down_write_nest_lock(&anon_vma->root->rwlock, &mm->mmap_sem); > > That's just completely bogus, and cannot work. Told you it's totally untested :-) Found that build failure a few minutes ago (the place escaped my search pattern), I'm trying the fix below. Ingo diff --git a/mm/mmap.c b/mm/mmap.c index 25ce233..7ee85bf 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -2955,7 +2955,7 @@ static void vm_lock_anon_vma(struct mm_struct *mm, struct anon_vma *anon_vma) * The LSB of head.next can't change from under us * because we hold the mm_all_locks_mutex. */ - down_write_nest_lock(&anon_vma->root->rwlock, &mm->mmap_sem); + write_lock(&anon_vma->root->rwlock); /* * We can safely modify head.next after taking the * anon_vma->root->rwlock. If some other vma in this mm shares -- 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/