NetBSD Problem Report #3536

Received: (qmail-queue invoked from smtpd); 25 Apr 1997 18:56:04 -0000
Message-Id: <199704251855.LAA13108@Cup.DSG.Stanford.EDU>
Date: Fri, 25 Apr 1997 11:55:34 -0700 (PDT)
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Reply-To: jonathan@DSG.Stanford.EDU
To: gnats-bugs@gnats.netbsd.org
Subject: Not putting packet headers in a separate mbuf causes panic on mips?
X-Send-Pr-Version: 3.95

>Number:         3536
>Category:       kern
>Synopsis:       am7990 mbuf changes cause panic  in ipintr()
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 25 12:05:02 +0000 1997
>Closed-Date:    Mon May 12 22:32:50 +0000 1997
>Last-Modified:  Mon May 12 22:33:08 +0000 1997
>Originator:     
>Release:        1997-04-24
>Organization:

>Environment:

System: NetBSD Cup.DSG.Stanford.EDU 1.2D NetBSD 1.2D (DSG_4K) #0: Mon Mar 31 20:29:11 PST 1997 jonathan@Cup.DSG.Stanford.EDU:/aga/n1/src/NetBSD/IP-PLUS/src/sys/arch/i386/compile/DSG_4K i386


>Description:

am7990.c rev 1.33 causes a panic in ipintr() on a DECstation when the
network is started.  I suspect that other CPUs that don't support
unaligned accesses will encounter the same problem.

>How-To-Repeat:

Build a -current kernel for a pmax as at 1997-04-24.

>Fix:

Reverting to rev 1.30 of am7990.c works around this problem for me.  I
don't know whether it's better to do that, or to rework ipintr() to
handle the mbuf chains that am7990.c now produces.
>Release-Note:
>Audit-Trail:

From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
To: gnats-bugs@gnats.netbsd.org
Cc:  Subject: Re: kern/3536: Not putting packet headers in a separate mbuf causes
         panic on mips?
Date: Fri, 25 Apr 1997 12:13:34 -0700

 The following patch to am7990.c rev. 1.33 also works around this
 problem, but effectively backs out rev. 1.32 and 1.33:

 *** am7990.c.DIST	Thu Apr 24 04:20:32 1997
 --- am7990.c	Fri Apr 25 12:00:09 1997
 ***************
 *** 435,441 ****
   			}
   			len = MLEN;
   		}
 ! 		if (totlen >= MINCLSIZE) {
   			MCLGET(m, M_DONTWAIT);
   			if ((m->m_flags & M_EXT) == 0) {
   				m_freem(top);
 --- 435,441 ----
   			}
   			len = MLEN;
   		}
 ! 		if (top && totlen >= MINCLSIZE) {
   			MCLGET(m, M_DONTWAIT);
   			if ((m->m_flags & M_EXT) == 0) {
   				m_freem(top);


From: Jason Thorpe <thorpej@nas.nasa.gov>
To: jonathan@dsg.stanford.edu
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: kern/3536: Not putting packet headers in a separate mbuf causes panic on mips? 
Date: Fri, 25 Apr 1997 12:02:42 -0700

 On Fri, 25 Apr 1997 11:55:34 -0700 (PDT) 
  Jonathan Stone <jonathan@DSG.Stanford.EDU> wrote:

  > >Fix:
  > 
  > Reverting to rev 1.30 of am7990.c works around this problem for me.  I
  > don't know whether it's better to do that, or to rework ipintr() to
  > handle the mbuf chains that am7990.c now produces.

 ...I believe this is the correct solution... This is an issue on the
 Alpha, as well.  All of the network drivers on the Alpha currently
 align the IP header in a separate mbuf (except for the LANCE, now,
 apparently... I haven't updated my DEC 3000 yet).

 I discussed this with Matt Thomas some months ago, and we came to
 the conclusion that it would be best solved in ipintr(), using
 the ALIGNED_POINTER() macro.  If it is not aligned, copy the IP header
 into a new mbuf, m_prepend() it, and continue.

 Compilers would remove the dead code on systems where this isn't an
 issue, and on systems where it _is_ an issue, you don't have to put
 alignment crap into ever driver (esp since alignment issues might be
 different for each layer 3).

 Jason R. Thorpe                                       thorpej@nas.nasa.gov
 NASA Ames Research Center                               Home: 408.866.1912
 NAS: M/S 258-6                                          Work: 415.604.0935
 Moffett Field, CA 94035                                Pager: 415.428.6939
State-Changed-From-To: open->closed 
State-Changed-By: thorpej 
State-Changed-When: Mon May 12 15:32:50 PDT 1997 
State-Changed-Why:  
Fixed some weeks ago. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.