diff options
Diffstat (limited to 'arch/mips/mm/fault.c')
-rw-r--r-- | arch/mips/mm/fault.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index fa636fc6b7b9..55767ad9f00e 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -97,7 +97,6 @@ good_area: | |||
97 | goto bad_area; | 97 | goto bad_area; |
98 | } | 98 | } |
99 | 99 | ||
100 | survive: | ||
101 | /* | 100 | /* |
102 | * If for any reason at all we couldn't handle the fault, | 101 | * If for any reason at all we couldn't handle the fault, |
103 | * make sure we exit gracefully rather than endlessly redo | 102 | * make sure we exit gracefully rather than endlessly redo |
@@ -167,21 +166,13 @@ no_context: | |||
167 | field, regs->regs[31]); | 166 | field, regs->regs[31]); |
168 | die("Oops", regs); | 167 | die("Oops", regs); |
169 | 168 | ||
170 | /* | ||
171 | * We ran out of memory, or some other thing happened to us that made | ||
172 | * us unable to handle the page fault gracefully. | ||
173 | */ | ||
174 | out_of_memory: | 169 | out_of_memory: |
175 | up_read(&mm->mmap_sem); | 170 | /* |
176 | if (is_global_init(tsk)) { | 171 | * We ran out of memory, call the OOM killer, and return the userspace |
177 | yield(); | 172 | * (which will retry the fault, or kill us if we got oom-killed). |
178 | down_read(&mm->mmap_sem); | 173 | */ |
179 | goto survive; | 174 | pagefault_out_of_memory(); |
180 | } | 175 | return; |
181 | printk("VM: killing process %s\n", tsk->comm); | ||
182 | if (user_mode(regs)) | ||
183 | do_group_exit(SIGKILL); | ||
184 | goto no_context; | ||
185 | 176 | ||
186 | do_sigbus: | 177 | do_sigbus: |
187 | up_read(&mm->mmap_sem); | 178 | up_read(&mm->mmap_sem); |