mm/hugetlb: Fix potential missing huge page size info
Subsystems (2)
PATCH 1/1 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.
Fixes aa50d3a7aa81 ("Encode huge page size for VM_FAULT_HWPOISON errors")
Signed-off-by Miaohe Lin <[email protected]>
Cc <[email protected]>
--- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/hugetlb.c +1 -1
@@ -4371,7 +4371,7 @@ static vm_fault_t hugetlb_no_page(struct mm_struct *mm,* So we need to block hugepage fault by PG_hwpoison bit check. */ if (unlikely (PageHWPoison (page))) { - ret =VM_FAULT_HWPOISON | + ret =VM_FAULT_HWPOISON_LARGE |VM_FAULT_SET_HINDEX (hstate_index (h)); goto backout_unlocked; }
Signature · 1 line
2.19.1
Quoted 9 lines · Miaohe Lin
The huge page size is encoded for
VM_FAULT_HWPOISONerrors only. So if we returnVM_FAULT_HWPOISON, huge page size would just be ignored.Fixes aa50d3a7aa81 ("Encode huge page size for VM_FAULT_HWPOISON errors")Signed-off-by Miaohe Lin <[email protected]>Cc <[email protected]>--- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks!
Reviewed-by Mike Kravetz <[email protected]>
Signature · 1 line
Mike Kravetz