From: Nick Piggin Date: Fri, 4 Jun 2010 21:14:51 +0000 (-0700) Subject: mn10300: invoke oom-killer from page fault X-Git-Tag: v2.6.35-rc2~32 X-Git-Url: http://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=c421b08ef52f38049c6f591c5d260a97af7b0000 mn10300: invoke oom-killer from page fault As explained in commit 1c0fe6e3bd ("mm: invoke oom-killer from page fault") , we want to call the architecture independent oom killer when getting an unexplained OOM from handle_mm_fault, rather than simply killing current. Signed-off-by: Nick Piggin Acked-by: David Rientjes Acked-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/mn10300/mm/fault.c b/arch/mn10300/mm/fault.c index 53bb17d0f06..81f153fa51b 100644 --- a/arch/mn10300/mm/fault.c +++ b/arch/mn10300/mm/fault.c @@ -338,11 +338,10 @@ no_context: */ out_of_memory: up_read(&mm->mmap_sem); - monitor_signal(regs); - printk(KERN_ALERT "VM: killing process %s\n", tsk->comm); - if ((fault_code & MMUFCR_xFC_ACCESS) == MMUFCR_xFC_ACCESS_USR) - do_exit(SIGKILL); - goto no_context; + if ((fault_code & MMUFCR_xFC_ACCESS) != MMUFCR_xFC_ACCESS_USR) + goto no_context; + pagefault_out_of_memory(); + return; do_sigbus: up_read(&mm->mmap_sem);