Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-08-07 Thread Davidlohr Bueso
Hi Geert, On Mon, 2014-04-21 at 09:52 +0200, Geert Uytterhoeven wrote: > Hi David, > > On Mon, Apr 21, 2014 at 12:28 AM, Davidlohr Bueso wrote: > > On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: > >> On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso wrote: > >> > Performing vma

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-08-07 Thread Davidlohr Bueso
Hi Geert, On Mon, 2014-04-21 at 09:52 +0200, Geert Uytterhoeven wrote: Hi David, On Mon, Apr 21, 2014 at 12:28 AM, Davidlohr Bueso davidl...@hp.com wrote: On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso davidl...@hp.com wrote:

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-21 Thread Geert Uytterhoeven
Hi David, On Mon, Apr 21, 2014 at 12:28 AM, Davidlohr Bueso wrote: > On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: >> On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso wrote: >> > Performing vma lookups without taking the mm->mmap_sem is asking >> > for trouble. While doing the

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-21 Thread Geert Uytterhoeven
Hi David, On Mon, Apr 21, 2014 at 12:28 AM, Davidlohr Bueso davidl...@hp.com wrote: On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso davidl...@hp.com wrote: Performing vma lookups without taking the mm-mmap_sem is asking for

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-20 Thread Davidlohr Bueso
On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: > Hi David, > > On Sun, Apr 20, 2014 at 4:26 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

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-20 Thread Geert Uytterhoeven
Hi David, On Sun, Apr 20, 2014 at 4:26 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

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-20 Thread Geert Uytterhoeven
Hi David, On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso davidl...@hp.com 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

Re: [PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

2014-04-20 Thread Davidlohr Bueso
On Sun, 2014-04-20 at 10:04 +0200, Geert Uytterhoeven wrote: Hi David, On Sun, Apr 20, 2014 at 4:26 AM, Davidlohr Bueso davidl...@hp.com 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

[PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

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

[PATCH 2/6] m68k: call find_vma with the mmap_sem held in sys_cacheflush()

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