--- a/mm/memory.c~mm-memoryc-replace-vmf-vma-with-variable-vma +++ a/mm/memory.c @@ -3597,7 +3597,7 @@ static vm_fault_t __do_fault(struct vm_f * # flush A, B to clear the writeback */ if (pmd_none(*vmf->pmd) && !vmf->prealloc_pte) { - vmf->prealloc_pte = pte_alloc_one(vmf->vma->vm_mm); + vmf->prealloc_pte = pte_alloc_one(vma->vm_mm); if (!vmf->prealloc_pte) return VM_FAULT_OOM; smp_wmb(); /* See comment in __pte_alloc() */