diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 4 | ||||
-rw-r--r-- | mm/mempolicy.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c index 34f8402d2046..405d9c56fa35 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -5841,8 +5841,10 @@ vm_fault_t handle_mm_fault(struct vm_area_struct *vma, unsigned long address, lru_gen_exit_fault(); /* If the mapping is droppable, then errors due to OOM aren't fatal. */ - if (is_droppable) + if (is_droppable && (ret & VM_FAULT_OOM)) { ret &= ~VM_FAULT_OOM; + ret |= VM_FAULT_SKIP_INSN; + } if (flags & FAULT_FLAG_USER) { mem_cgroup_exit_user_fault(); diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b858e22b259d..d75e0ee19aa3 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2306,7 +2306,7 @@ struct folio *vma_alloc_folio_noprof(gfp_t gfp, int order, struct vm_area_struct struct folio *folio; if (vma->vm_flags & VM_DROPPABLE) - gfp |= __GFP_NOWARN; + gfp |= __GFP_NOWARN | __GFP_NORETRY; pol = get_vma_policy(vma, addr, order, &ilx); folio = folio_alloc_mpol_noprof(gfp, order, pol, ilx, numa_node_id()); |