Date: Tue, 23 Aug 2005 10:36:22 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Maksim Yevmenkin <maksim.yevmenkin@gmail.com> Cc: "Evgueni V. Gavrilov" <aquatique@rusunix.org>, freebsd-current@freebsd.org, glebius@freebsd.org, freebsd-net@freebsd.org Subject: Re: [Fwd: assigning an address to ng_fec(4) iface causes panic] Message-ID: <20050823173622.GB6926@odin.ac.hmc.edu> In-Reply-To: <bb4a86c70508231009131c50f2@mail.gmail.com> References: <430B57A7.1050402@savvis.net> <bb4a86c70508231009131c50f2@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Tue, Aug 23, 2005 at 10:09:06AM -0700, Maksim Yevmenkin wrote:
> Hello,
>
> please try the attached patch.
>
> > >Description:
> > assigning an address to ng_fec(4) iface causes panic
> > during dumping to dumpdev another panic occurs preventing to identify the source of the first panic and having the crash dump
> >
> > 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;
>
> - ifp = arg;
> - priv = ifp->if_softc;
> + priv = arg;
> + ifp = priv->ifp;
> b = &priv->fec_bundle;
>
> if (b->fec_ifcnt == 1 || b->fec_ifcnt == 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
--
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQFDC16VXY6L6fI4GtQRArvTAJ0eCAQE1rElgHPWqd2QJ0jidlTiRQCgpZbs
9ZAmmrsGXJg8ibYmcs7d8ts=
=GUpk
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050823173622.GB6926>
