diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-11 03:03:30 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-11 03:03:30 +0100 |
commit | f45ac22ae2b8fc5b4c32d9b8d17ea419a8701d89 (patch) | |
tree | 8e05bccd7b85fc3dd2fbd33ec3286de27e152819 /arch/x86/mm/fault.c | |
parent | x86, mtrr: fix types used in userspace exported header (diff) | |
parent | Linux 2.6.29-rc1 (diff) | |
download | linux-f45ac22ae2b8fc5b4c32d9b8d17ea419a8701d89.tar.xz linux-f45ac22ae2b8fc5b4c32d9b8d17ea419a8701d89.zip |
Merge commit 'v2.6.29-rc1' into x86/urgent
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 57ec8c86a877..9e268b6b204e 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -667,7 +667,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code) if (unlikely(in_atomic() || !mm)) goto bad_area_nosemaphore; -again: /* * When running in the kernel we expect faults to occur only to * addresses in user space. All other faults represent errors in the @@ -859,25 +858,14 @@ no_context: oops_end(flags, regs, sig); #endif -/* - * 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: + /* + * 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). + */ up_read(&mm->mmap_sem); - if (is_global_init(tsk)) { - yield(); - /* - * Re-lookup the vma - in theory the vma tree might - * have changed: - */ - goto again; - } - - printk("VM: killing process %s\n", tsk->comm); - if (error_code & PF_USER) - do_group_exit(SIGKILL); - goto no_context; + pagefault_out_of_memory(); + return; do_sigbus: up_read(&mm->mmap_sem); |