From owner-freebsd-current@FreeBSD.ORG Wed Oct 8 17:34:04 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7DE816A4B3; Wed, 8 Oct 2003 17:34:04 -0700 (PDT) Received: from ebb.errno.com (ebb.errno.com [66.127.85.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0608343FD7; Wed, 8 Oct 2003 17:34:04 -0700 (PDT) (envelope-from sam@errno.com) Received: from 66.127.85.92 ([66.127.85.92]) (authenticated bits=0) by ebb.errno.com (8.12.9/8.12.9) with ESMTP id h990Y20x024272 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 8 Oct 2003 17:34:03 -0700 (PDT) (envelope-from sam@errno.com) From: Sam Leffler Organization: Errno Consulting To: deischen@freebsd.org, Daniel Eischen , current@freebsd.org Date: Wed, 8 Oct 2003 17:40:01 -0700 User-Agent: KMail/1.5.2 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200310081740.01768.sam@errno.com> Subject: Re: if_em panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2003 00:34:04 -0000 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 > @@ -933,7 +933,7 @@ > > 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