Re: Kernel Panic on 4.3-RC #0 using PPPoE
On Wed, Mar 28, 2001 at 11:30:49AM +0400, Yar Tikhiy wrote: > > Please take a careful look at the frames 6 through 9 of the stack > trace in PR#25478, so you may notice that your patch happens to do > nothing about the broblem. You are going to add a check for IFF_UP > to ether_output_frame() while that function is just a bottom half > of ether_output(), which does do the check at its very beginning. Just a clarifying note: Please keep in mind that ether_output() (frame 9) through vlan_start() (frame 7) are called on a vlan interface while fxp_start() (frame 6) is called on a different interface - fxp. > The real problem is that ethernet card drivers rely on ether_output() > making sure they are up before calling their if_output()s. AFAIK > the vlan driver is the only piece of code where the standard > ether_output()->if_output() order is bypassed, and an if_output() > routine of an ethernet card is called directly. Therefore, the > IFF_UP check should be in the vlan code, and I'm going to commit > a corresponding fix (PR: kern/22179). Any objections? Please substitute "if_output" with "if_start" when reading the above paragraph. Sorry :-) SY, Yar To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Re: Kernel Panic on 4.3-RC #0 using PPPoE
Hi, On Tue, Mar 27, 2001 at 12:40:11PM -0800, Archie Cobbs wrote: > Mike Tancsa writes: > > >Not sure why this hasn't been detected before though. Below is > > >a possible patch. > > > > It has been at http://www.freebsd.org/cgi/query-pr.cgi?pr=25478 and > > discussed a few times in freebsd-net. > > Here is the better (?) patch. I'd like to commit this if nobody > objects.. Please take a careful look at the frames 6 through 9 of the stack trace in PR#25478, so you may notice that your patch happens to do nothing about the broblem. You are going to add a check for IFF_UP to ether_output_frame() while that function is just a bottom half of ether_output(), which does do the check at its very beginning. The real problem is that ethernet card drivers rely on ether_output() making sure they are up before calling their if_output()s. AFAIK the vlan driver is the only piece of code where the standard ether_output()->if_output() order is bypassed, and an if_output() routine of an ethernet card is called directly. Therefore, the IFF_UP check should be in the vlan code, and I'm going to commit a corresponding fix (PR: kern/22179). Any objections? > Luigi: would you mind reviewing this for possible BRIDGE problems? > > -Archie > > __ > Archie Cobbs * Packet Design * http://www.packetdesign.com > > Index: if_ethersubr.c > === > RCS file: /home/ncvs/src/sys/net/if_ethersubr.c,v > retrieving revision 1.70.2.15 > diff -u -r1.70.2.15 if_ethersubr.c > --- if_ethersubr.c2001/03/13 22:00:32 1.70.2.15 > +++ if_ethersubr.c2001/03/27 20:39:38 > @@ -366,6 +366,11 @@ > { > int s, error = 0; > > + if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { > + m_freem(m); > + return (ENETDOWN); > + } > + > #ifdef BRIDGE > if (do_bridge && BDG_USED(ifp) ) { > struct ether_header *eh; /* a ptr suffices */ SY, Yar To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message
Re: Kernel Panic on 4.3-RC #0 using PPPoE
Archie Cobbs writes: > > I am receiving kernel panics under 4.3-RC #0 when trying to bring up PPPoE. > > A copy of the kernel debug, the start up and the actual PPP configuration are > > attached. It appears to be something in the subroutine called fxp_start of > > the actual ethernet card (Which is an Intel Express) trying to use a structure > > which has not yet been initialized. The machine is an SMP machine as well; > > although compiling without SMP support has so far made no difference. The > > problem also occurs under 4.2-RELEASE. Any help on the subject would be > > appreciated. > > I think that the interface has not yet been brought up (IFF_UP) > before the first packet is sent out of it. This can normally only > happen when using netgraph (or raw sockets I suppose)... the > fxp driver seems to assume that it will never see an output packet > without an IFF_UP first, which is no longer true. > > Also, ppp(8) should be setting IFF_UP on the interface before > trying to send out of it. > > Not sure why this hasn't been detected before though. Below is > a possible patch. Actually a better fix is probably to check for IFF_UP at the beginning of ether_output_frame()... -Archie __ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-stable" in the body of the message