Commit 1cb3d8e2 authored by Nick Piggin's avatar Nick Piggin Committed by Matt Turner

alpha: invoke oom-killer from page fault

As explained in commit 1c0fe6e3, 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: linux-alpha@vger.kernel.org
Cc: Richard Henderson <rth@twiddle.net>
Cc: linux-arch@vger.kernel.org
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
parent 9ce34c8f
...@@ -142,7 +142,6 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -142,7 +142,6 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
goto bad_area; goto bad_area;
} }
survive:
/* If for any reason at all we couldn't handle the fault, /* If for any reason at all we couldn't handle the fault,
make sure we exit gracefully rather than endlessly redo make sure we exit gracefully rather than endlessly redo
the fault. */ the fault. */
...@@ -188,16 +187,10 @@ do_page_fault(unsigned long address, unsigned long mmcsr, ...@@ -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 /* We ran out of memory, or some other thing happened to us that
made us unable to handle the page fault gracefully. */ made us unable to handle the page fault gracefully. */
out_of_memory: 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)) if (!user_mode(regs))
goto no_context; goto no_context;
do_group_exit(SIGKILL); pagefault_out_of_memory();
return;
do_sigbus: do_sigbus:
/* Send a sigbus, regardless of whether we were in kernel /* Send a sigbus, regardless of whether we were in kernel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment