From 2c0bc39683525526afb9072c9a58fa556c6bdaaa Mon Sep 17 00:00:00 2001
From: David Greenman <dg@FreeBSD.org>
Date: Tue, 21 Feb 1995 12:06:06 +0000
Subject: [PATCH] Panic if u_map allocation fails.

---
 sys/vm/vm_glue.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index dc6f4e899b0d..77dc0391ad19 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -59,7 +59,7 @@
  * any improvements or extensions that they make and grant Carnegie the
  * rights to redistribute these changes.
  *
- * $Id: vm_glue.c,v 1.15 1995/02/14 06:11:21 phk Exp $
+ * $Id: vm_glue.c,v 1.16 1995/02/20 17:26:21 davidg Exp $
  */
 
 #include <sys/param.h>
@@ -225,6 +225,8 @@ vm_fork(p1, p2, isvfork)
 
 	/* get a kernel virtual address for the UPAGES for this proc */
 	up = (struct user *) kmem_alloc_pageable(u_map, UPAGES * NBPG);
+	if (up == NULL)
+		panic("vm_fork: u_map allocation failed");
 
 	/* and force-map the upages into the kernel pmap */
 	for (i = 0; i < UPAGES; i++)