Skip to content

Commit

Permalink
microblaze: invoke oom-killer from page fault
Browse files Browse the repository at this point in the history
As explained in commit 1c0fe6e, we want to call the architecture independent
oom killer when getting an unexplained OOM from handle_mm_fault, rather than
simply killing current.

Cc: microblaze-uclinux@itee.uq.edu.au
Cc: Michal Simek <monstr@monstr.eu>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
Acked-by: Michal Simek <monstr@monstr.eu>
  • Loading branch information
Nick Piggin authored and Michal Simek committed May 6, 2010
1 parent f3ff821 commit 21e1c93
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions arch/microblaze/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,11 @@ void do_page_fault(struct pt_regs *regs, unsigned long address,
* us unable to handle the page fault gracefully.
*/
out_of_memory:
if (current->pid == 1) {
yield();
down_read(&mm->mmap_sem);
goto survive;
}
up_read(&mm->mmap_sem);
printk(KERN_WARNING "VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_exit(SIGKILL);
bad_page_fault(regs, address, SIGKILL);
if (!user_mode(regs))
bad_page_fault(regs, address, SIGKILL);
else
pagefault_out_of_memory();
return;

do_sigbus:
Expand Down

0 comments on commit 21e1c93

Please sign in to comment.