diff options
author | Nick Piggin | 2010-04-22 18:06:20 +0200 |
---|---|---|
committer | Geert Uytterhoeven | 2010-05-17 21:37:39 +0200 |
commit | adbf6e6952e80ae42a403442dcae21438cae94b3 (patch) | |
tree | 225f4f2db9fe9b682546e663c66c85cf510b3ea7 /arch/m68k | |
parent | serial167: Kill unused variables (diff) | |
download | kernel-qcow2-linux-adbf6e6952e80ae42a403442dcae21438cae94b3.tar.gz kernel-qcow2-linux-adbf6e6952e80ae42a403442dcae21438cae94b3.tar.xz kernel-qcow2-linux-adbf6e6952e80ae42a403442dcae21438cae94b3.zip |
m68k: 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-m68k@lists.linux-m68k.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
[Geert] Kill 2 introduced compiler warnings
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r-- | arch/m68k/mm/fault.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index d0e35cf99fc6..a96394a0333d 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c @@ -154,7 +154,6 @@ good_area: * the fault. */ - survive: fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); #ifdef DEBUG printk("handle_mm_fault returns %d\n",fault); @@ -180,15 +179,10 @@ good_area: */ 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", current->comm); - if (user_mode(regs)) - do_group_exit(SIGKILL); + if (!user_mode(regs)) + goto no_context; + pagefault_out_of_memory(); + return 0; no_context: current->thread.signo = SIGBUS; |