mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
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:
@@ -3601,6 +3601,11 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
|
|||||||
vm_fault_t ret;
|
vm_fault_t ret;
|
||||||
void *shadow = NULL;
|
void *shadow = NULL;
|
||||||
|
|
||||||
|
if (vmf->flags & FAULT_FLAG_SPECULATIVE) {
|
||||||
|
pte_unmap(vmf->pte);
|
||||||
|
return VM_FAULT_RETRY;
|
||||||
|
}
|
||||||
|
|
||||||
ret = pte_unmap_same(vmf);
|
ret = pte_unmap_same(vmf);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user