diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/xtensa/mm/fault.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c index bc0733359a88..e367e3026436 100644 --- a/arch/xtensa/mm/fault.c +++ b/arch/xtensa/mm/fault.c | |||
@@ -105,7 +105,6 @@ good_area: | |||
105 | * make sure we exit gracefully rather than endlessly redo | 105 | * make sure we exit gracefully rather than endlessly redo |
106 | * the fault. | 106 | * the fault. |
107 | */ | 107 | */ |
108 | survive: | ||
109 | fault = handle_mm_fault(mm, vma, address, is_write ? FAULT_FLAG_WRITE : 0); | 108 | fault = handle_mm_fault(mm, vma, address, is_write ? FAULT_FLAG_WRITE : 0); |
110 | if (unlikely(fault & VM_FAULT_ERROR)) { | 109 | if (unlikely(fault & VM_FAULT_ERROR)) { |
111 | if (fault & VM_FAULT_OOM) | 110 | if (fault & VM_FAULT_OOM) |
@@ -146,15 +145,10 @@ bad_area: | |||
146 | */ | 145 | */ |
147 | out_of_memory: | 146 | out_of_memory: |
148 | up_read(&mm->mmap_sem); | 147 | up_read(&mm->mmap_sem); |
149 | if (is_global_init(current)) { | 148 | if (!user_mode(regs)) |
150 | yield(); | 149 | bad_page_fault(regs, address, SIGKILL); |
151 | down_read(&mm->mmap_sem); | 150 | else |
152 | goto survive; | 151 | pagefault_out_of_memory(); |
153 | } | ||
154 | printk("VM: killing process %s\n", current->comm); | ||
155 | if (user_mode(regs)) | ||
156 | do_group_exit(SIGKILL); | ||
157 | bad_page_fault(regs, address, SIGKILL); | ||
158 | return; | 152 | return; |
159 | 153 | ||
160 | do_sigbus: | 154 | do_sigbus: |