ANDROID: mm: avoid using vmacache in lockless vma search
When searching vma under RCU protection vmcache should be avoided because a race with munmap() might result in finding a vma and placing it into vmcache after munmap() removed that vma and called vmcache_invalidate. Once that vma is freed, vmcache will be left with an invalid vma pointer. Bug: 257443051 Change-Id: I62438305fcf5139974f4f7d3bae5b22c74084a59 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
@@ -2734,6 +2734,8 @@ extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
|
||||
#define expand_upwards(vma, address) (0)
|
||||
#endif
|
||||
|
||||
extern struct vm_area_struct *find_vma_from_tree(struct mm_struct *mm,
|
||||
unsigned long addr);
|
||||
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
|
||||
extern struct vm_area_struct * __find_vma(struct mm_struct * mm, unsigned long addr);
|
||||
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
|
||||
|
||||
Reference in New Issue
Block a user