diff options
| author | Nick Piggin <npiggin@suse.de> | 2010-04-22 12:06:20 -0400 |
|---|---|---|
| committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-05-17 15:37:39 -0400 |
| commit | adbf6e6952e80ae42a403442dcae21438cae94b3 (patch) | |
| tree | 225f4f2db9fe9b682546e663c66c85cf510b3ea7 /arch/m68k/mm/fault.c | |
| parent | f3c7f317c91e45aac0ef9d0b6474cd4637de69f0 (diff) | |
m68k: invoke oom-killer from page fault
As explained in commit 1c0fe6e3bd, we want to call the architecture independent
oom killer when getting an unexplained OOM from handle_mm_fault, rather than
simply killing current.
Cc: linux-m68k@lists.linux-m68k.org
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-arch@vger.kernel.org
Signed-off-by: Nick Piggin <npiggin@suse.de>
Acked-by: David Rientjes <rientjes@google.com>
[Geert] Kill 2 introduced compiler warnings
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/mm/fault.c')
| -rw-r--r-- | arch/m68k/mm/fault.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c index d0e35cf99fc6..a96394a0333d 100644 --- a/arch/m68k/mm/fault.c +++ b/arch/m68k/mm/fault.c | |||
| @@ -154,7 +154,6 @@ good_area: | |||
| 154 | * the fault. | 154 | * the fault. |
| 155 | */ | 155 | */ |
| 156 | 156 | ||
| 157 | survive: | ||
| 158 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); | 157 | fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0); |
| 159 | #ifdef DEBUG | 158 | #ifdef DEBUG |
| 160 | printk("handle_mm_fault returns %d\n",fault); | 159 | printk("handle_mm_fault returns %d\n",fault); |
| @@ -180,15 +179,10 @@ good_area: | |||
| 180 | */ | 179 | */ |
| 181 | out_of_memory: | 180 | out_of_memory: |
| 182 | up_read(&mm->mmap_sem); | 181 | up_read(&mm->mmap_sem); |
| 183 | if (is_global_init(current)) { | 182 | if (!user_mode(regs)) |
| 184 | yield(); | 183 | goto no_context; |
| 185 | down_read(&mm->mmap_sem); | 184 | pagefault_out_of_memory(); |
| 186 | goto survive; | 185 | return 0; |
| 187 | } | ||
| 188 | |||
| 189 | printk("VM: killing process %s\n", current->comm); | ||
| 190 | if (user_mode(regs)) | ||
| 191 | do_group_exit(SIGKILL); | ||
| 192 | 186 | ||
| 193 | no_context: | 187 | no_context: |
| 194 | current->thread.signo = SIGBUS; | 188 | current->thread.signo = SIGBUS; |
