]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mips: call find_vma with the mmap_sem held
authorDavidlohr Bueso <davidlohr@hp.com>
Wed, 14 May 2014 00:01:50 +0000 (10:01 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:01:50 +0000 (10:01 +1000)
commitebc99f421dc7ada9837487b27e2242cb1ddb9670
tree0b037980f9607a8da381f037e1d8243010091023
parent3e86d17717482778702d70036d295b8cfeba4f9f
mips: call find_vma with the mmap_sem held

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 (exclusively)
in order to avoid races while iterating through the vmacache and/or
rbtree.

Updates two functions:
  - process_fpemu_return()
  - cteon_flush_cache_sigtramp()

Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Tested-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/mips/kernel/traps.c
arch/mips/mm/c-octeon.c