Commit a89182c7 authored by Adam Litke's avatar Adam Litke Committed by Linus Torvalds
Browse files

Fix VM_FAULT flags conversion for hugetlb

It seems a simple mistake was made when converting follow_hugetlb_page()
over to the VM_FAULT flags bitmasks (in "mm: fault feedback #2", commit


By using the wrong bitmask, hugetlb_fault() failures are not being
recognized.  This results in an infinite loop whenever follow_hugetlb_page
is involved in a failed fault.
Signed-off-by: default avatarAdam Litke <>
Acked-by: default avatarNick Piggin <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent d4c63b7c
......@@ -643,7 +643,7 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
ret = hugetlb_fault(mm, vma, vaddr, 0);
if (!(ret & VM_FAULT_MAJOR))
if (!(ret & VM_FAULT_ERROR))
remainder = 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment