lkml.org 
[lkml]   [2013]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] anon_vmas: Convert the rwsem to an rwlock_t

* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Sat, Sep 28, 2013 at 12:37 PM, Ingo Molnar <mingo@kernel.org> 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

\
 
 \ /
  Last update: 2013-09-28 22:01    [W:0.248 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site