From f716fd8a067eb497754411dbca31e2d15ee042cc Mon Sep 17 00:00:00 2001 From: "Kirill A. Shutemov" Date: Thu, 29 Nov 2012 14:17:38 +1100 Subject: [PATCH] thp-setup-huge-zero-page-on-non-write-page-fault-fix Cc: Andrea Arcangeli Cc: Andi Kleen Cc: "H. Peter Anvin" Cc: Mel Gorman Cc: David Rientjes Signed-off-by: Andrew Morton --- mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 58e8004243a6..373119d7f0e1 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -738,7 +738,7 @@ int do_huge_pmd_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma, pgtable_t pgtable; pgtable = pte_alloc_one(mm, haddr); if (unlikely(!pgtable)) - goto out; + return VM_FAULT_OOM; spin_lock(&mm->page_table_lock); set_huge_zero_page(pgtable, mm, vma, haddr, pmd); spin_unlock(&mm->page_table_lock); -- 2.39.5