diff options
-rw-r--r-- | arch/sh/mm/fault_32.c | 13 | ||||
-rw-r--r-- | arch/sh/mm/tlbflush_64.c | 19 |
2 files changed, 8 insertions, 24 deletions
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c index 8bf79e3b7bdd..93c3447ed40a 100644 --- a/arch/sh/mm/fault_32.c +++ b/arch/sh/mm/fault_32.c | |||
@@ -290,15 +290,10 @@ no_context: | |||
290 | */ | 290 | */ |
291 | out_of_memory: | 291 | out_of_memory: |
292 | up_read(&mm->mmap_sem); | 292 | up_read(&mm->mmap_sem); |
293 | if (is_global_init(current)) { | 293 | if (!user_mode(regs)) |
294 | yield(); | 294 | goto no_context; |
295 | down_read(&mm->mmap_sem); | 295 | pagefault_out_of_memory(); |
296 | goto survive; | 296 | return; |
297 | } | ||
298 | printk("VM: killing process %s\n", tsk->comm); | ||
299 | if (user_mode(regs)) | ||
300 | do_group_exit(SIGKILL); | ||
301 | goto no_context; | ||
302 | 297 | ||
303 | do_sigbus: | 298 | do_sigbus: |
304 | up_read(&mm->mmap_sem); | 299 | up_read(&mm->mmap_sem); |
diff --git a/arch/sh/mm/tlbflush_64.c b/arch/sh/mm/tlbflush_64.c index 706da1d3a67a..25bd64c0977c 100644 --- a/arch/sh/mm/tlbflush_64.c +++ b/arch/sh/mm/tlbflush_64.c | |||
@@ -294,22 +294,11 @@ no_context: | |||
294 | * us unable to handle the page fault gracefully. | 294 | * us unable to handle the page fault gracefully. |
295 | */ | 295 | */ |
296 | out_of_memory: | 296 | out_of_memory: |
297 | if (is_global_init(current)) { | ||
298 | panic("INIT out of memory\n"); | ||
299 | yield(); | ||
300 | goto survive; | ||
301 | } | ||
302 | printk("fault:Out of memory\n"); | ||
303 | up_read(&mm->mmap_sem); | 297 | up_read(&mm->mmap_sem); |
304 | if (is_global_init(current)) { | 298 | if (!user_mode(regs)) |
305 | yield(); | 299 | goto no_context; |
306 | down_read(&mm->mmap_sem); | 300 | pagefault_out_of_memory(); |
307 | goto survive; | 301 | return; |
308 | } | ||
309 | printk("VM: killing process %s\n", tsk->comm); | ||
310 | if (user_mode(regs)) | ||
311 | do_group_exit(SIGKILL); | ||
312 | goto no_context; | ||
313 | 302 | ||
314 | do_sigbus: | 303 | do_sigbus: |
315 | printk("fault:Do sigbus\n"); | 304 | printk("fault:Do sigbus\n"); |