ANDROID: mm: prevent speculative page fault handling for in do_swap_page()

do_swap_page() uses migration_entry_wait() which operates on page tables
without protection. Disable speculative page fault handling.

Bug: 257443051
Change-Id: I677eb1ee85707dce533d5d811dcde5f5dabcfdf3
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
Suren Baghdasaryan
2022-11-18 15:23:53 -08:00
parent 0560f5f7b3
commit 4b388752ac

View File

@@ -3601,6 +3601,11 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
vm_fault_t ret;
void *shadow = NULL;
if (vmf->flags & FAULT_FLAG_SPECULATIVE) {
pte_unmap(vmf->pte);
return VM_FAULT_RETRY;
}
ret = pte_unmap_same(vmf);
if (ret) {
/*