ANDROID: GKI: bring back find_extend_vma()
In commit 8d7071af8907 ("mm: always expand the stack with the mmap write lock held"), find_extend_vma() was no longer being used in the tree, so it was removed. Unfortunately some GKI external module is using this, so bring it back to allow things to continue to work. Bug: 161946584 Fixes: 8d7071af8907 ("mm: always expand the stack with the mmap write lock held") Change-Id: I6f1fb1fd8193625fe3dac0bbc5b0aff653b3d879 Cc: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
188ce9572f
commit
c0ba567af1
@ -3094,6 +3094,7 @@ unsigned long change_prot_numa(struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end);
|
||||
#endif
|
||||
|
||||
struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
|
||||
struct vm_area_struct *find_extend_vma_locked(struct mm_struct *,
|
||||
unsigned long addr);
|
||||
int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
|
||||
|
14
mm/mmap.c
14
mm/mmap.c
@ -2231,6 +2231,20 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ANDROID: Reintroduce find_extend_vma() as it's still used by some external
|
||||
* modules. It was removed in commit 8d7071af8907 ("mm: always expand the
|
||||
* stack with the mmap write lock held")
|
||||
* In the future, everyone should just move to use the correct function instead
|
||||
* of this old, legacy one.
|
||||
*/
|
||||
struct vm_area_struct *find_extend_vma(struct mm_struct *mm,
|
||||
unsigned long addr)
|
||||
{
|
||||
return find_extend_vma_locked(mm, addr);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(find_extend_vma);
|
||||
|
||||
/*
|
||||
* IA64 has some horrid mapping rules: it can expand both up and down,
|
||||
* but with various special rules.
|
||||
|
Loading…
Reference in New Issue
Block a user