From: Christoph Lameter Date: Sun, 5 Feb 2006 07:27:55 +0000 (-0800) Subject: [PATCH] hugetlb: add comment explaining reasons for Bus Errors X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=64b4a954b03a1153fb8ae38d6ffbd991e01a1e80;p=linux-beck.git [PATCH] hugetlb: add comment explaining reasons for Bus Errors I just spent some time researching a Bus Error. Turns out that the huge page fault handler can return VM_FAULT_SIGBUS for various conditions where no huge page is available. Add a note explaining the reasoning in the source. Signed-off-by: Christoph Lameter Acked-by: William Lee Irwin III Cc: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b21d78c941b5..ceb3ebb3c399 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -444,6 +444,15 @@ 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! + */ goto out; }