Skip to content

Commit

Permalink
alpha: invoke oom-killer from page fault
Browse files Browse the repository at this point in the history
As explained in commit 1c0fe6e, we want to call the architecture
independent oom killer when getting an unexplained OOM from
handle_mm_fault, rather than simply killing current.

[mattst88: kill now unused 'survive' label]
Cc: [email protected]
Cc: Richard Henderson <[email protected]>
Cc: [email protected]
Acked-by: David Rientjes <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
Signed-off-by: Nick Piggin <[email protected]>
  • Loading branch information
Nick Piggin authored and Matt Turner committed May 25, 2010
1 parent 9ce34c8 commit 1cb3d8e
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions arch/alpha/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto bad_area;
}

survive:
/* If for any reason at all we couldn't handle the fault,
make sure we exit gracefully rather than endlessly redo
the fault. */
Expand Down Expand Up @@ -188,16 +187,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
/* We ran out of memory, or some other thing happened to us that
made us unable to handle the page fault gracefully. */
out_of_memory:
if (is_global_init(current)) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
printk(KERN_ALERT "VM: killing process %s(%d)\n",
current->comm, task_pid_nr(current));
if (!user_mode(regs))
goto no_context;
do_group_exit(SIGKILL);
pagefault_out_of_memory();
return;

do_sigbus:
/* Send a sigbus, regardless of whether we were in kernel
Expand Down

0 comments on commit 1cb3d8e

Please sign in to comment.