Messages in this thread | | | Date | Sat, 28 Sep 2013 12:43:51 -0700 | Subject | Re: [PATCH] anon_vmas: Convert the rwsem to an rwlock_t | From | Linus Torvalds <> |
| |
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.
Maybe just a "write_lock(&anon_vma->root->rwlock)" (which is just anon_vma_unlock_write(anon_vma)). But I think we might have a lockdep issue. I'm not quite sure what's up with the nesting there.
> - if (rwsem_is_locked(&anon_vma->root->rwsem)) { > + if (write_can_lock(&anon_vma->root->rwlock)) { > anon_vma_lock_write(anon_vma); > anon_vma_unlock_write(anon_vma); > }
That's the wrong way around. It should be
if (!write_can_lock(&anon_vma->root->rwlock)) {
so some more testing definitely needed.
Linus
| |