Update of /cvsroot/linux-mips/linux/arch/mips/mm
In directory usw-pr-cvs1:/tmp/cvs-serv8606/arch/mips/mm
Modified Files:
fault.c
Log Message:
Don't kill init when OOM.
Index: fault.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/mm/fault.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fault.c 2001/10/22 20:43:28 1.3
+++ fault.c 2001/10/22 21:04:22 1.4
@@ -100,6 +100,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++;
@@ -176,6 +177,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);
|