From 26d4fc7ffabf0fd10c2b4c3ef56f804bea9a26f6 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Mon, 12 Jan 2009 00:09:13 +0000 Subject: [PATCH] --- yaml --- r: 130554 b: refs/heads/master c: c7c1e3846bac1e4b8a8941f6a194812e28b0a519 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/mips/mm/fault.c | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 1047f31d57e6..4e9915cca920 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a8ca8b64e3fdfec17679cba0ca5ce6e3ffed092d +refs/heads/master: c7c1e3846bac1e4b8a8941f6a194812e28b0a519 diff --git a/trunk/arch/mips/mm/fault.c b/trunk/arch/mips/mm/fault.c index fa636fc6b7b9..55767ad9f00e 100644 --- a/trunk/arch/mips/mm/fault.c +++ b/trunk/arch/mips/mm/fault.c @@ -97,7 +97,6 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, goto bad_area; } -survive: /* * If for any reason at all we couldn't handle the fault, * make sure we exit gracefully rather than endlessly redo @@ -167,21 +166,13 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write, field, regs->regs[31]); die("Oops", regs); -/* - * We ran out of memory, or some other thing happened to us that made - * us unable to handle the page fault gracefully. - */ out_of_memory: - up_read(&mm->mmap_sem); - if (is_global_init(tsk)) { - 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; + /* + * We ran out of memory, call the OOM killer, and return the userspace + * (which will retry the fault, or kill us if we got oom-killed). + */ + pagefault_out_of_memory(); + return; do_sigbus: up_read(&mm->mmap_sem);