From owner-freebsd-net@FreeBSD.ORG Tue Aug 9 18:16:02 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 B960D16A41F for ; Tue, 9 Aug 2005 18:16:02 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 68DA843D45 for ; Tue, 9 Aug 2005 18:16:02 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id j79IG1Gh028865; Tue, 9 Aug 2005 11:16:01 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j79IG1Iv028864; Tue, 9 Aug 2005 11:16:01 -0700 Date: Tue, 9 Aug 2005 11:16:01 -0700 From: Brooks Davis To: Darcy Buskermolen Message-ID: <20050809181601.GB20908@odin.ac.hmc.edu> References: <200508090854.21278.darcy@wavefire.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LyciRD1jyfeSSjG0" Content-Disposition: inline In-Reply-To: <200508090854.21278.darcy@wavefire.com> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu Cc: freebsd-net@freebsd.org Subject: Re: panic: if_attach called without if_alloc'd input() X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 18:16:02 -0000 --LyciRD1jyfeSSjG0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 09, 2005 at 08:54:21AM -0700, Darcy Buskermolen wrote: > I'm getting the following panic on my RELENG_6 test box: >=20 > xl1f0: BUG: if_attach called without if_alloc'd input() >=20 > Where should I be looking to track this down? I suspect it has to do with= a=20 > custom kernel, it wasn't doing it when i was running GENERIC The ef(4) device is currently broken. I haven't had time to look at it much though it seems mostly correct by inspection so I'm not sure what's going on. If you could compile with debugging and get be a stack trace from the panic, that might help be track this down. I'm assuming there's a path through the code that I'm missing that results in using a bogus cast to get an ifnet pointer and thus causes a panic. You might also try the following patch which fixes a couple bugs I think are unrelated, but may not be. -- Brooks Index: if_ef.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/ncvs/src/sys/net/if_ef.c,v retrieving revision 1.34 diff -u -p -r1.34 if_ef.c --- if_ef.c 10 Jun 2005 16:49:18 -0000 1.34 +++ if_ef.c 26 Jul 2005 23:56:39 -0000 @@ -477,7 +477,7 @@ ef_clone(struct ef_link *efl, int ft) efp->ef_pifp =3D ifp; efp->ef_frametype =3D ft; eifp =3D efp->ef_ifp =3D if_alloc(IFT_ETHER); - if (ifp =3D=3D NULL) + if (eifp =3D=3D NULL) return (ENOSPC); snprintf(eifp->if_xname, IFNAMSIZ, "%sf%d", ifp->if_xname, efp->ef_frametype); @@ -536,8 +536,8 @@ ef_load(void) SLIST_FOREACH(efl, &efdev, el_next) { for (d =3D 0; d < EF_NFT; d++) if (efl->el_units[d]) { - if (efl->el_units[d]->ef_pifp !=3D NULL) - if_free(efl->el_units[d]->ef_pifp); + if (efl->el_units[d]->ef_ifp !=3D NULL) + if_free(efl->el_units[d]->ef_ifp); free(efl->el_units[d], M_IFADDR); } free(efl, M_IFADDR); --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --LyciRD1jyfeSSjG0 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFC+PLhXY6L6fI4GtQRAta7AKCe/TGJoaouw/4aijvbCACn78SJ3gCePMuB 17xpkruirwfZsEHOwi6aQTw= =dVFL -----END PGP SIGNATURE----- --LyciRD1jyfeSSjG0--