Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64b4a954 authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

[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: default avatarChristoph Lameter <clameter@sgi.com>
Acked-by: default avatarWilliam Lee Irwin III <wli@holomorphy.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent fe1dcbc4
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;
		}