if_em panic

From: Daniel Eischen <eischen_at_vigrid.com>
Date: Wed, 8 Oct 2003 20:27:47 -0400 (EDT)
One of my buddies is having panics with if_em after the last
set of changes a couple of weeks ago.  He runs dhclient
on the interface to get a lease from a cable modem.  The
panic is a recurse on a non-recursive mutex.  I haven't
gotten a traceback from him yet, but a little perusing
through the source seems to show this as a possible problem:

Index: if_em.c
===================================================================
RCS file: /opt/FreeBSD/cvs/src/sys/dev/em/if_em.c,v
retrieving revision 1.30
diff -u -r1.30 if_em.c
--- if_em.c	23 Sep 2003 00:18:25 -0000	1.30
+++ if_em.c	8 Oct 2003 20:12:56 -0000
_at__at_ -933,7 +933,7 _at__at_
 
         if (ether_poll_register(em_poll, ifp)) {
                 em_disable_intr(adapter);
-                em_poll(ifp, 0, 1);
+		em_poll_locked(ifp, 0, 1);
 		EM_UNLOCK(adapter);
                 return;
         }

Also, indentation is inconsistent, some lines use tabs, some
uses spaces.  It looks like the original code from Intel used
spaces and subsequent mods used tabs.  I guess we should be
sticking with the original style, but it is easy to overlook.

-- 
Dan Eischen
Received on Wed Oct 08 2003 - 15:27:49 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:24 UTC