diff options
-rw-r--r-- | mm/hugetlb.c | 9 |
1 files changed, 9 insertions, 0 deletions
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: | |||
444 | page = alloc_huge_page(vma, address); | 444 | page = alloc_huge_page(vma, address); |
445 | if (!page) { | 445 | if (!page) { |
446 | hugetlb_put_quota(mapping); | 446 | hugetlb_put_quota(mapping); |
447 | /* | ||
448 | * No huge pages available. So this is an OOM | ||
449 | * condition but we do not want to trigger the OOM | ||
450 | * killer, so we return VM_FAULT_SIGBUS. | ||
451 | * | ||
452 | * A program using hugepages may fault with Bus Error | ||
453 | * because no huge pages are available in the cpuset, per | ||
454 | * memory policy or because all are in use! | ||
455 | */ | ||
447 | goto out; | 456 | goto out; |
448 | } | 457 | } |
449 | 458 | ||