aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/mm/fault_32.c13
-rw-r--r--arch/sh/mm/tlbflush_64.c19
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 */
291out_of_memory: 291out_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
303do_sigbus: 298do_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 */
296out_of_memory: 296out_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
314do_sigbus: 303do_sigbus:
315 printk("fault:Do sigbus\n"); 304 printk("fault:Do sigbus\n");