X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=mm%2Fhugetlb.c;h=67f29516662a4b9d3c2291731a2259808646f54c;hb=02df360bf38ca2acb78ddee9fd28262e9474153c;hp=ceb3ebb3c399e9e346c12b15a8411616f871d5db;hpb=3cfc15103aa56c2c7ee6dd312c24a8d1697bade1;p=~andy%2Flinux diff --git a/mm/hugetlb.c b/mm/hugetlb.c index ceb3ebb3c39..67f29516662 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -107,7 +107,7 @@ struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr) set_page_count(page, 1); page[1].mapping = (void *)free_huge_page; for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i) - clear_highpage(&page[i]); + clear_user_highpage(&page[i], addr); return page; } @@ -391,12 +391,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma, if (!new_page) { page_cache_release(old_page); - - /* Logically this is OOM, not a SIGBUS, but an OOM - * could cause the kernel to go killing other - * processes which won't help the hugepage situation - * at all (?) */ - return VM_FAULT_SIGBUS; + return VM_FAULT_OOM; } spin_unlock(&mm->page_table_lock); @@ -444,15 +439,7 @@ retry: page = alloc_huge_page(vma, address); if (!page) { hugetlb_put_quota(mapping); - /* - * No huge pages available. So this is an OOM - * condition but we do not want to trigger the OOM - * killer, so we return VM_FAULT_SIGBUS. - * - * A program using hugepages may fault with Bus Error - * because no huge pages are available in the cpuset, per - * memory policy or because all are in use! - */ + ret = VM_FAULT_OOM; goto out; }