The patch titled Subject: mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 has been removed from the -mm tree. Its filename was mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2.patch This patch was dropped because it was folded into mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified.patch ------------------------------------------------------ From: James Morse <james.morse@xxxxxxx> Subject: mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 Added vm_fault_to_errno() call to faultin_page() as Naoya Horiguchi suggested. Link: http://lkml.kernel.org/r/20170525171035.16359-1-james.morse@xxxxxxx Signed-off-by: James Morse <james.morse@xxxxxxx> Acked-by: Punit Agrawal <punit.agrawal@xxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/gup.c | 10 ++++------ mm/hugetlb.c | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff -puN mm/gup.c~mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 mm/gup.c --- a/mm/gup.c~mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 +++ a/mm/gup.c @@ -721,12 +721,10 @@ retry: ret = handle_mm_fault(vma, address, fault_flags); major |= ret & VM_FAULT_MAJOR; if (ret & VM_FAULT_ERROR) { - if (ret & VM_FAULT_OOM) - return -ENOMEM; - if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE)) - return -EHWPOISON; - if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV)) - return -EFAULT; + int err = vm_fault_to_errno(ret, 0); + + if (err) + return err; BUG(); } diff -puN mm/hugetlb.c~mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 mm/hugetlb.c --- a/mm/hugetlb.c~mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified-v2 +++ a/mm/hugetlb.c @@ -4172,9 +4172,10 @@ long follow_hugetlb_page(struct mm_struc if (ret & VM_FAULT_ERROR) { int err = vm_fault_to_errno(ret, flags); - remainder = 0; if (err) return err; + + remainder = 0; break; } if (ret & VM_FAULT_RETRY) { _ Patches currently in -mm which might be from james.morse@xxxxxxx are mm-hugetlb-report-ehwpoison-not-efault-when-foll_hwpoison-is-specified.patch mm-hwpoison-use-compound_head-flags-for-huge-pages.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html