patch-2.4.10 linux/arch/alpha/mm/fault.c

Next file: linux/arch/alpha/mm/init.c
Previous file: linux/arch/alpha/kernel/traps.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/arch/alpha/mm/fault.c linux/arch/alpha/mm/fault.c
@@ -140,6 +140,7 @@
 			goto bad_area;
 	}
 
+ survive:
 	/*
 	 * If for any reason at all we couldn't handle the fault,
 	 * make sure we exit gracefully rather than endlessly redo
@@ -194,6 +195,12 @@
  * us unable to handle the page fault gracefully.
  */
 out_of_memory:
+	if (current->pid == 1) {
+		current->policy |= SCHED_YIELD;
+		schedule();
+		down_read(&mm->mmap_sem);
+		goto survive;
+	}
 	printk(KERN_ALERT "VM: killing process %s(%d)\n",
 	       current->comm, current->pid);
 	if (!user_mode(regs))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)