Re: [PATCH 4/6] arc: call find_vma with the mmap_sem held

2014-04-21 Thread Vineet Gupta
Hi, On Sunday 20 April 2014 07:56 AM, Davidlohr Bueso wrote: > Performing vma lookups without taking the mm->mmap_sem is asking > for trouble. While doing the search, the vma in question can be > modified or even removed before returning to the caller. Take the > lock (shared) in order to avoid ra

[PATCH 4/6] arc: call find_vma with the mmap_sem held

2014-04-19 Thread Davidlohr Bueso
Performing vma lookups without taking the mm->mmap_sem is asking for trouble. While doing the search, the vma in question can be modified or even removed before returning to the caller. Take the lock (shared) in order to avoid races while iterating through the vmacache and/or rbtree. This patch is