From owner-freebsd-current@FreeBSD.ORG Tue Aug 23 17:36:23 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 8090016A41F; Tue, 23 Aug 2005 17:36:23 +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 2BEC343D45; Tue, 23 Aug 2005 17:36:23 +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 j7NHaMKJ019046; Tue, 23 Aug 2005 10:36:22 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id j7NHaMeb019045; Tue, 23 Aug 2005 10:36:22 -0700 Date: Tue, 23 Aug 2005 10:36:22 -0700 From: Brooks Davis To: Maksim Yevmenkin Message-ID: <20050823173622.GB6926@odin.ac.hmc.edu> References: <430B57A7.1050402@savvis.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="s2ZSL+KKDSLx8OML" Content-Disposition: inline In-Reply-To: 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: "Evgueni V. Gavrilov" , freebsd-current@freebsd.org, glebius@freebsd.org, freebsd-net@freebsd.org Subject: Re: [Fwd: assigning an address to ng_fec(4) iface causes panic] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 23 Aug 2005 17:36:23 -0000 --s2ZSL+KKDSLx8OML Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 23, 2005 at 10:09:06AM -0700, Maksim Yevmenkin wrote: > Hello, >=20 > please try the attached patch. >=20 > > >Description: > > assigning an address to ng_fec(4) iface causes panic > > during dumping to dumpdev another panic occurs preventing to id= entify the source of the first panic and having the crash dump > >=20 > > ng_iface creation sequence: > > mkpeer fec dummy fec > > msg fec0: add_iface "em0" > > msg fec0: add_iface "em1" > > msg fec0: set_mode_mac > > > --- ng_fec.c.orig Mon Aug 22 11:42:51 2005 > +++ ng_fec.c Tue Aug 23 10:05:23 2005 > @@ -544,8 +544,8 @@ > struct ifnet *ifp, *bifp; > struct ng_fec_portlist *p; > =20 > - ifp =3D arg; > - priv =3D ifp->if_softc; > + priv =3D arg; > + ifp =3D priv->ifp; > b =3D &priv->fec_bundle; > =20 > if (b->fec_ifcnt =3D=3D 1 || b->fec_ifcnt =3D=3D 3) { This isn't quite sufficent. You also should change the ng_fec_init(ifp) call on line 718 to ng_fec_init(ifp->if_softc). If that work's I'll commit it. I've got to say this calling convention is really stupid. I'm really tempted to change ifp->if_init() to take a struct ifnet * even though it means an API change and a tree sweep. -- Brooks --=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 --s2ZSL+KKDSLx8OML Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFDC16VXY6L6fI4GtQRArvTAJ0eCAQE1rElgHPWqd2QJ0jidlTiRQCgpZbs 9ZAmmrsGXJg8ibYmcs7d8ts= =GUpk -----END PGP SIGNATURE----- --s2ZSL+KKDSLx8OML--