*BSD News Article 13799


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!torn!utnut!utcsri!newsflash.concordia.ca!sifon!thunder.mcrcim.mcgill.edu!enterpoop.mit.edu!gatech!usenet.ins.cwru.edu!agate!doc.ic.ac.uk!pipex!sunic!ugle.unit.no!flipper.pvv.unit.no!imf.unit.no!arnej
From: arnej@imf.unit.no (Arne Henrik Juul)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: kmem_map overflow with 0.2.2 kernel
Date: 1 Apr 93 01:27:43
Organization: Norwegian Institute of Technology
Lines: 35
Message-ID: <ARNEJ.93Apr1012743@chanur.imf.unit.no>
References: <C4Kw3q.C6M@sugar.neosoft.com>
NNTP-Posting-Host: chanur.imf.unit.no
In-reply-to: peter@NeoSoft.com's message of Sun, 28 Mar 1993 02:55:02 GMT


On kmem_map crashes, it is probably a good idea to apply the
following patch to the kernel, since it may be any of *three*
distinct maps that was too small.

  -arnej


*** /0.1/usr/src/sys.386bsd/vm/vm_kern.c	Sat Jul 18 01:44:36 1992
--- /usr/src/sys.386bsd/vm/vm_kern.c	Fri Feb 19 23:40:45 1993
***************
*** 369,376 ****
  
  	if (vm_map_find(map, NULL, (vm_offset_t)0,
  			&addr, size, TRUE) != KERN_SUCCESS) {
! 		if (canwait)
! 			panic("kmem_malloc: kmem_map too small");
  		return(0);
  	}
  
--- 369,382 ----
  
  	if (vm_map_find(map, NULL, (vm_offset_t)0,
  			&addr, size, TRUE) != KERN_SUCCESS) {
! 		if (canwait) {
! 			if (map==kmem_map)
! 				panic("kmem_malloc: kmem_map too small");
! 			if (map==mb_map)
! 				panic("kmem_malloc: mb_map too small");
! 			if (map==buffer_map)
! 				panic("kmem_malloc: buffer_map too small");
! 		}
  		return(0);
  	}