ANDROID: mm: add missing check in the backport for handling faults under VMA lock
While backporting, a check for vma locking inside do_wp_page() was
missed. Add it.
Fixes: 3ebafb7b46
("BACKPORT: FROMGIT: mm: handle faults that merely update the accessed bit under the VMA lock")
Bug: 293665307
Change-Id: Ibd7f21ae8fec7b8edc6e3d88954714b5fad41516
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
parent
1fe248991f
commit
4fcc13c1ff
@ -3500,6 +3500,12 @@ static vm_fault_t do_wp_page(struct vm_fault *vmf)
|
||||
return wp_page_shared(vmf);
|
||||
}
|
||||
copy:
|
||||
if ((vmf->flags & FAULT_FLAG_VMA_LOCK) && !vma->anon_vma) {
|
||||
pte_unmap_unlock(vmf->pte, vmf->ptl);
|
||||
vma_end_read(vmf->vma);
|
||||
return VM_FAULT_RETRY;
|
||||
}
|
||||
|
||||
/*
|
||||
* Ok, we need to copy. Oh, well..
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user