dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Nick Piggin 2010-04-23 02:06:20 +10:00 committed by Geert Uytterhoeven
parent f3c7f317c9
commit adbf6e6952
1 changed files with 4 additions and 10 deletions

View File

@ -154,7 +154,6 @@ good_area:
* the fault. * the fault.
*/ */
survive:
fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
#ifdef DEBUG #ifdef DEBUG
printk("handle_mm_fault returns %d\n",fault); printk("handle_mm_fault returns %d\n",fault);
@ -180,15 +179,10 @@ good_area:
*/ */
out_of_memory: out_of_memory:
up_read(&mm->mmap_sem); up_read(&mm->mmap_sem);
if (is_global_init(current)) { if (!user_mode(regs))
yield(); goto no_context;
down_read(&mm->mmap_sem); pagefault_out_of_memory();
goto survive; return 0;
}
printk("VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_group_exit(SIGKILL);
no_context: no_context:
current->thread.signo = SIGBUS; current->thread.signo = SIGBUS;