diff options
author | Davidlohr Bueso <davidlohr@hp.com> | 2014-10-09 15:29:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:26:02 -0400 |
commit | cd2567b6850b1648236a4aab0513a04ebaea6aa8 (patch) | |
tree | 7321c0818a0d6af6ef2aa07dcc6e6f65757370cf /mm/zsmalloc.c | |
parent | 7cc36bbddde5cd0c98f0c06e3304ab833d662565 (diff) | |
download | linux-cd2567b6850b1648236a4aab0513a04ebaea6aa8.tar.gz linux-cd2567b6850b1648236a4aab0513a04ebaea6aa8.tar.bz2 linux-cd2567b6850b1648236a4aab0513a04ebaea6aa8.zip |
m68k: call find_vma with the mmap_sem held in sys_cacheflush()
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.
In addition, this guarantees that the address space will remain intact
during the CPU flushing.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/zsmalloc.c')
0 files changed, 0 insertions, 0 deletions