aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-02-07 15:58:30 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-07 19:12:31 -0500
commit0df420d8b6c718d9a5e37531c3a9a6804493e9f4 (patch)
tree6b8edbb55eb8d5e84fb223bbcef7c54789270cde /mm
parenta2dfef6947139db9b886fce510c4d0c913beb5f0 (diff)
[PATCH] hugetlbpage: return VM_FAULT_OOM on oom
Remove wrong and misleading comments. Return VM_FAULT_OOM if the hugetlbpage fault handler cannot allocate a page. do_no_page will end up doing do_exit(SIGKILL). Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 3255ca420fc8..67f29516662a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -391,12 +391,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
391 391
392 if (!new_page) { 392 if (!new_page) {
393 page_cache_release(old_page); 393 page_cache_release(old_page);
394 394 return VM_FAULT_OOM;
395 /* Logically this is OOM, not a SIGBUS, but an OOM
396 * could cause the kernel to go killing other
397 * processes which won't help the hugepage situation
398 * at all (?) */
399 return VM_FAULT_SIGBUS;
400 } 395 }
401 396
402 spin_unlock(&mm->page_table_lock); 397 spin_unlock(&mm->page_table_lock);
@@ -444,15 +439,7 @@ retry:
444 page = alloc_huge_page(vma, address); 439 page = alloc_huge_page(vma, address);
445 if (!page) { 440 if (!page) {
446 hugetlb_put_quota(mapping); 441 hugetlb_put_quota(mapping);
447 /* 442 ret = VM_FAULT_OOM;
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 */
456 goto out; 443 goto out;
457 } 444 }
458 445