aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/mm/fault_32.c
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2010-04-22 16:06:26 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-04-26 15:47:01 +0900
commit6b6b18e62cfba44ce7b6489c7100f12b199232d7 (patch)
treedb4a2c60dec3b6dcfbcd46d5e3f056dbac34d646 /arch/sh/mm/fault_32.c
parent4a6feab0ee5240c4bd5378d9f8a46b85718c68a7 (diff)
sh: invoke oom-killer from page fault
As explained in commit 1c0fe6e3bd, we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Cc: linux-sh@vger.kernel.org Cc: linux-arch@vger.kernel.org Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm/fault_32.c')
-rw-r--r--arch/sh/mm/fault_32.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 8bf79e3b7bd..93c3447ed40 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -290,15 +290,10 @@ no_context:
*/
out_of_memory:
up_read(&mm->mmap_sem);
- if (is_global_init(current)) {
- yield();
- down_read(&mm->mmap_sem);
- goto survive;
- }
- printk("VM: killing process %s\n", tsk->comm);
- if (user_mode(regs))
- do_group_exit(SIGKILL);
- goto no_context;
+ if (!user_mode(regs))
+ goto no_context;
+ pagefault_out_of_memory();
+ return;
do_sigbus:
up_read(&mm->mmap_sem);