From owner-freebsd-current@FreeBSD.ORG Mon Apr 14 03:28:22 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C11DF37B401 for ; Mon, 14 Apr 2003 03:28:22 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA3F543FD7 for ; Mon, 14 Apr 2003 03:28:21 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h3EASJSA007647; Mon, 14 Apr 2003 12:28:19 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: Gavin Atkinson From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 14 Apr 2003 11:18:14 BST." <20030414105157.G47006-100000@endor.bu.nker.net> Date: Mon, 14 Apr 2003 12:28:19 +0200 Message-ID: <7646.1050316099@critter.freebsd.dk> cc: "Christoph P. Kukulies" cc: freebsd-current@freebsd.org Subject: Re: kernel: bad malloc : 4 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 10:28:23 -0000 You are right, they are bad and should be fixed. Poul-Henning In message <20030414105157.G47006-100000@endor.bu.nker.net>, Gavin Atkinson wri tes: >On Sun, 13 Apr 2003, Poul-Henning Kamp wrote: >> In message <20030413140647.GA18474@gilberto.physik.rwth-aachen.de>, "Christoph >> P. Kukulies" writes: >> >Here is what I could type off the screen: >> > >> >Bad malloc flags: 4 >> >> This means that malloc() was called with M_DONTWAIT which is a mbuf >> allocator flags. > >It looks like this is done in a few places in other bits of code... > >sys/netinet/ip_fw.c: ipfw_dyn_v = malloc(curr_dyn_buckets * sizeof r, >sys/netinet/ip_fw.c- M_IPFW, M_DONTWAIT | M_ZERO); >sys/netinet/ip_fw.c- if (ipfw_dyn_v == NULL) > >sys/netinet6/frag6.c: q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE, >sys/netinet6/frag6.c- M_DONTWAIT); >sys/netinet6/frag6.c- if (q6 == NULL) > >sys/netinet6/frag6.c: ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FTABLE, >sys/netinet6/frag6.c- M_DONTWAIT); >sys/netinet6/frag6.c- if (ip6af == NULL) > >So, these are bad? It looks like they were fixed in January by imp, and >then backed out in February. I have no idea why it was backed out. > >Gavin > > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.