Re: if_em panic

From: Sam Leffler <sam_at_errno.com>
Date: Wed, 8 Oct 2003 17:40:01 -0700
On Wednesday 08 October 2003 05:27 pm, Daniel Eischen wrote:
> 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;
>          }
>

Thanks, I've got work to do on DEVICE_POLLING (changes to the core polling 
code are still sitting in my perforce tree).  I'll commit after going over 
the driver again.

> 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.

Yeah, probably.  I wouldn't notice it.  I agree that it's important to conform 
to local style, regardless of whether it conflicts with style(9).

	Sam
Received on Wed Oct 08 2003 - 15:34:04 UTC

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