patch-2.2.14 linux/arch/sparc/mm/asyncd.c

Next file: linux/arch/sparc/mm/fault.c
Previous file: linux/arch/sparc/mm/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.13/linux/arch/sparc/mm/asyncd.c linux/arch/sparc/mm/asyncd.c
@@ -1,4 +1,4 @@
-/*  $Id: asyncd.c,v 1.12 1998/09/13 04:30:30 davem Exp $
+/*  $Id: asyncd.c,v 1.12.2.1 1999/11/16 06:29:36 davem Exp $
  *  The asyncd kernel daemon. This handles paging on behalf of 
  *  processes that receive page faults due to remote (async) memory
  *  accesses. 
@@ -152,7 +152,9 @@
 	if(!pte)
 		goto no_memory;
 	if(!pte_present(*pte)) {
-		handle_mm_fault(tsk, vma, address, write);
+		int fault = handle_mm_fault(tsk, vma, address, write);
+		if (fault < 0)
+			goto no_memory;
 		goto finish_up;
 	}
 	set_pte(pte, pte_mkyoung(*pte));
@@ -164,7 +166,11 @@
 		flush_tlb_page(vma, address);
 		goto finish_up;
 	}
-	handle_mm_fault(tsk, vma, address, write);
+	{
+		int fault = handle_mm_fault(tsk, vma, address, write);
+		if (fault < 0)
+			goto no_memory;
+	}
 
 	/* Fall through for do_wp_page */
 finish_up:
@@ -173,7 +179,7 @@
 
 no_memory:
 	stats.failure++;
-	oom(tsk);
+	force_sig(SIGKILL, tsk);
 	return 1;
 	
 bad_area:	  

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