Date: Sat, 18 Aug 2001 23:59:51 -0700 From: Julian Elischer <julian@elischer.org> To: Bosko Milekic <bmilekic@technokratis.com> Cc: Julian Elischer <julian@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern uipc_mbuf.c uipc_usrreq.c Message-ID: <3B7F63E7.B88EAA26@elischer.org> References: <200108190430.f7J4UEJ01333@freefall.freebsd.org> <20010819023551.B331@technokratis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B7F63E7.B88EAA26>