From owner-freebsd-net Wed Nov 6 3:56:29 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FAA237B401 for ; Wed, 6 Nov 2002 03:56:28 -0800 (PST) Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id C47D543E3B for ; Wed, 6 Nov 2002 03:56:26 -0800 (PST) (envelope-from brandt@fokus.gmd.de) Received: from beagle (beagle [193.175.132.100]) by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id gA6BuDl02538; Wed, 6 Nov 2002 12:56:13 +0100 (MET) Date: Wed, 6 Nov 2002 12:56:13 +0100 (CET) From: Harti Brandt To: Iasen Kostov Cc: Archie Cobbs , Subject: Re: NFS functions does *NOT* check if they really have allocated any memory In-Reply-To: <20021106120422.G80368-100000@shadowhand.OTEL.net> Message-ID: <20021106125444.K20974-100000@beagle.fokus.gmd.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Wed, 6 Nov 2002, Iasen Kostov wrote: IK> IK> IK>On Tue, 5 Nov 2002, Archie Cobbs wrote: IK> IK>> Iasen Kostov writes: IK>> > As I experience system crushes at time of mbufs exhaustion I've compiled IK>> > a debug kernel and traced the problem. I seems the NFS functions IK>> > (nfsm_rpchead, nfsm_reqh ...) does *NOT* chek if they really have IK>> > allocated memory by MGET macro. IK>> IK>> No check is necessary if M_WAIT is specified; the M_GET() function IK>> is always successful in that case. Same for malloc(). Wrong. malloc() returns always successful with M_WAIT, M_GET not. There is a timeout the M_GET() will wait, but the it will return NULL. harti To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message