*BSD News Article 4251


Return to BSD News archive

Path: sserve!manuel!munnari.oz.au!uunet!mcsun!Germany.EU.net!tools!tools!ws
From: ws@tools.de (Wolfgang Solfrank)
Newsgroups: comp.unix.bsd
Subject: Re: 386BSD: buffer space allocation -- a small bugfix.
Date: 29 Aug 92 19:11:32
Organization: TooLs GmbH, Bonn, Germany
Lines: 13
Message-ID: <WS.92Aug29191132@kurt.tools.de>
References: <tih.714982908@barsoom> <tih.714989648@barsoom>
NNTP-Posting-Host: kurt.tools.de
In-reply-to: tih@barsoom.nhh.no's message of Fri, 28 Aug 1992 08:14:08 GMT

In the place you mention the parameter cantwait doesn't have
any real relevance. But since the caller of kmem_malloc()
with canwait set probably doesn't check the return code
it's better to panic right away than by letting the kernel
use the NULL pointer and dereference it. If canwait is
clear the caller has to check the result anyway, so it
can return a NULL pointer as indication of failure.

The real canwait decision is done further down in the code.

Hope this helps...
--
ws@tools.de     (Wolfgang Solfrank, TooLs GmbH) +49-228-985800