From: Paul M. <le...@us...> - 2001-10-22 21:04:25
|
Update of /cvsroot/linux-mips/linux/arch/mips64/mm In directory usw-pr-cvs1:/tmp/cvs-serv8606/arch/mips64/mm Modified Files: fault.c Log Message: Don't kill init when OOM. Index: fault.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips64/mm/fault.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fault.c 2001/10/22 21:03:27 1.4 +++ fault.c 2001/10/22 21:04:22 1.5 @@ -154,6 +154,7 @@ * make sure we exit gracefully rather than endlessly redo * the fault. */ +survive: switch (handle_mm_fault(mm, vma, address, write)) { case 1: tsk->min_flt++; @@ -234,6 +235,12 @@ */ out_of_memory: up_read(&mm->mmap_sem); + if (current->pid == 1) { + current->policy |= SCHED_YIELD; + schedule(); + down_read(&mm->mmap_sem); + goto survive; + } printk("VM: killing process %s\n", tsk->comm); if (user_mode(regs)) do_exit(SIGKILL); |