Dennis writes:
> The change in 4.1 to ether_ifattach() needs a check to see if the device is
> already attached.
> 
> calling ether_ifattch() with a device already attached will lock up the
> system consistently.

No interface should be attached twice, Ethernet or other, right?
So try this patch and find out which driver is broken.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

Index: sys/net/if.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if.c,v
retrieving revision 1.91
diff -u -r1.91 if.c
--- if.c        2000/07/16 01:46:42     1.91
+++ if.c        2000/08/06 19:42:47
@@ -146,6 +146,17 @@
                inited = 1;
        }
 
+#ifdef INVARIANTS
+       {
+               struct ifnet *qent;
+
+               TAILQ_FOREACH(qent, &ifnet, if_link) {
+                       KASSERT(qent != ifp, ("%s%d: already attached",
+                           ifp->if_name, ifp->if_unit));
+               }
+       }
+#endif
+
        TAILQ_INSERT_TAIL(&ifnet, ifp, if_link);
        ifp->if_index = ++if_index;
        /*


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to