diff options
Diffstat (limited to 'arch/s390/mm/fault.c')
-rw-r--r-- | arch/s390/mm/fault.c | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 4d537205e83c..833e8366c351 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -200,29 +200,6 @@ static void do_low_address(struct pt_regs *regs, unsigned long error_code) | |||
200 | do_no_context(regs, error_code, 0); | 200 | do_no_context(regs, error_code, 0); |
201 | } | 201 | } |
202 | 202 | ||
203 | /* | ||
204 | * We ran out of memory, or some other thing happened to us that made | ||
205 | * us unable to handle the page fault gracefully. | ||
206 | */ | ||
207 | static int do_out_of_memory(struct pt_regs *regs, unsigned long error_code, | ||
208 | unsigned long address) | ||
209 | { | ||
210 | struct task_struct *tsk = current; | ||
211 | struct mm_struct *mm = tsk->mm; | ||
212 | |||
213 | up_read(&mm->mmap_sem); | ||
214 | if (is_global_init(tsk)) { | ||
215 | yield(); | ||
216 | down_read(&mm->mmap_sem); | ||
217 | return 1; | ||
218 | } | ||
219 | printk("VM: killing process %s\n", tsk->comm); | ||
220 | if (regs->psw.mask & PSW_MASK_PSTATE) | ||
221 | do_group_exit(SIGKILL); | ||
222 | do_no_context(regs, error_code, address); | ||
223 | return 0; | ||
224 | } | ||
225 | |||
226 | static void do_sigbus(struct pt_regs *regs, unsigned long error_code, | 203 | static void do_sigbus(struct pt_regs *regs, unsigned long error_code, |
227 | unsigned long address) | 204 | unsigned long address) |
228 | { | 205 | { |
@@ -367,7 +344,6 @@ good_area: | |||
367 | goto bad_area; | 344 | goto bad_area; |
368 | } | 345 | } |
369 | 346 | ||
370 | survive: | ||
371 | if (is_vm_hugetlb_page(vma)) | 347 | if (is_vm_hugetlb_page(vma)) |
372 | address &= HPAGE_MASK; | 348 | address &= HPAGE_MASK; |
373 | /* | 349 | /* |
@@ -378,8 +354,8 @@ survive: | |||
378 | fault = handle_mm_fault(mm, vma, address, write); | 354 | fault = handle_mm_fault(mm, vma, address, write); |
379 | if (unlikely(fault & VM_FAULT_ERROR)) { | 355 | if (unlikely(fault & VM_FAULT_ERROR)) { |
380 | if (fault & VM_FAULT_OOM) { | 356 | if (fault & VM_FAULT_OOM) { |
381 | if (do_out_of_memory(regs, error_code, address)) | 357 | up_read(&mm->mmap_sem); |
382 | goto survive; | 358 | pagefault_out_of_memory(); |
383 | return; | 359 | return; |
384 | } else if (fault & VM_FAULT_SIGBUS) { | 360 | } else if (fault & VM_FAULT_SIGBUS) { |
385 | do_sigbus(regs, error_code, address); | 361 | do_sigbus(regs, error_code, address); |