3133 static int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, 3134 unsigned long addr, pte_t pte, pte_t *ptep, pmd_t *pmd) 3135 { /* ... */ 3144 3145 /* A PROT_NONE fault should not end up here */ 3146 BUG_ON(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))); 3147
3235 static int handle_pte_fault(struct mm_struct *mm, 3236 struct vm_area_struct *vma, unsigned long address, 3237 pte_t *pte, pmd_t *pmd, unsigned int flags) 3238 { /* ... */ 3265 if (pte_protnone(entry)) 3266 return do_numa_page(mm, vma, address, entry, pte, pmd); 3267
handle_pte_fault() appears to ensure that it calls do_numa_page() only on the exact condition do_numa_page() considers a bug.
http://lxr.free-electrons.com/source/mm/memory.c?v=4.2#L3146 http://lxr.free-electrons.com/source/mm/memory.c?v=4.2#L3266
3133 static int do_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, !(vma-> vm_flags & (VM_READ | VM_EXEC | VM_WRITE)));
3134 unsigned long addr, pte_t pte, pte_t *ptep, pmd_t *pmd)
3135 {
/* ... */
3144
3145 /* A PROT_NONE fault should not end up here */
3146 BUG_ON(
3147
3235 static int handle_ pte_fault( struct mm_struct *mm, entry))
3236 struct vm_area_struct *vma, unsigned long address,
3237 pte_t *pte, pmd_t *pmd, unsigned int flags)
3238 {
/* ... */
3265 if (pte_protnone(
3266 return do_numa_page(mm, vma, address, entry, pte, pmd);
3267
handle_pte_fault() appears to ensure that it calls do_numa_page() only on the exact condition do_numa_page() considers a bug.
http:// lxr.free- electrons. com/source/ mm/memory. c?v=4.2# L3146 lxr.free- electrons. com/source/ mm/memory. c?v=4.2# L3266
http://