From owner-cvs-all Sun Aug 19 0: 8:11 2001 Delivered-To: cvs-all@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 7ABB837B409; Sun, 19 Aug 2001 00:08:00 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id AAA30793; Sun, 19 Aug 2001 00:16:35 -0700 (PDT) Message-ID: <3B7F63E7.B88EAA26@elischer.org> Date: Sat, 18 Aug 2001 23:59:51 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Bosko Milekic Cc: Julian Elischer , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c uipc_usrreq.c References: <200108190430.f7J4UEJ01333@freefall.freebsd.org> <20010819023551.B331@technokratis.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bosko Milekic wrote: > > On Sat, Aug 18, 2001 at 09:30:13PM -0700, Julian Elischer wrote: > > julian 2001/08/18 21:30:13 PDT > > > > Modified files: > > sys/kern uipc_mbuf.c uipc_usrreq.c > > Log: > > Forgot to remove this un-needed test. (M_WAITOK won't fail) > > I vaguely remember someone once proving it COULD return NULL.. > > was that changed? > > This is correct. malloc(9) cannot fail (well it can, but it will > call panic()) if it is called with M_WAITOK. The distinction is in the mbuf > code where _mbuf allocations_ can either be called with M_DONWAIT (can fail > if can't get resources) or M_TRYWAIT (can fail if can't get resources and > have tried waiting to no avail). Thus, mbuf allocations should always be > accompanied by a check for allocation failure and proper measures should be > taken should this occur (i.e. drop packet, whatever). This is not the case > for malloc(9). ah yes.. that was it.. thanks > > > Reminded by: BDE > > > > MFC after: 2 weeks > > > > Revision Changes Path > > 1.87 +2 -2 src/sys/kern/uipc_mbuf.c > > 1.70 +1 -3 src/sys/kern/uipc_usrreq.c > > -- > Bosko Milekic > bmilekic@technokratis.com -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message