Skip to content

Commit 0eb98f1

Browse files
MiaoheLintorvalds
authored andcommitted
mm/hugetlb: fix potential missing huge page size info
The huge page size is encoded for VM_FAULT_HWPOISON errors only. So if we return VM_FAULT_HWPOISON, huge page size would just be ignored. Link: https://lkml.kernel.org/r/20210107123449.38481-1-linmiaohe@huawei.com Fixes: aa50d3a ("Encode huge page size for VM_FAULT_HWPOISON errors") Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent f555bef commit 0eb98f1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mm/hugetlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4371,7 +4371,7 @@ static vm_fault_t hugetlb_no_page(struct mm_struct *mm,
43714371
* So we need to block hugepage fault by PG_hwpoison bit check.
43724372
*/
43734373
if (unlikely(PageHWPoison(page))) {
4374-
ret = VM_FAULT_HWPOISON |
4374+
ret = VM_FAULT_HWPOISON_LARGE |
43754375
VM_FAULT_SET_HINDEX(hstate_index(h));
43764376
goto backout_unlocked;
43774377
}

0 commit comments

Comments
 (0)