From owner-freebsd-current@FreeBSD.ORG Thu Apr 22 15:19:21 2004 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 6211216A4CE; Thu, 22 Apr 2004 15:19:21 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0207943D4C; Thu, 22 Apr 2004 15:19:21 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i3MMJ4xR032509; Thu, 22 Apr 2004 18:19:04 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i3MMJ3nv032506; Thu, 22 Apr 2004 18:19:03 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Thu, 22 Apr 2004 18:19:03 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: "Simon L. Nielsen" In-Reply-To: <20040422214923.GC801@zaphod.nitro.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@FreeBSD.org Subject: Re: panic: mutex Giant not owned at src/sys/security/mac/mac_net.c:355 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, 22 Apr 2004 22:19:21 -0000 On Thu, 22 Apr 2004, Simon L. Nielsen wrote: > > > > Are you running a main line kernel with debug.mpsafenet turned on? > > > > > > Main line kernel (I assume you mean no special patches), but > > > debug.mpsafenet is turned off. > > > > > > [root@soekris:~] sysctl debug.mpsafenet > > > debug.mpsafenet: 0 > > > > In the main line kernel with debug.mpsafenet turned off, INTR_MPSAFE is > > supposed to be ignored for network interrupts, resulting in inbound > > network stack code running with Giant held. Is there any chance that the > > interrupt thread is being shared with another device? dmesg output would > > Possibly, I'm not really sure how to check that. > > > be useful, along with some devinfo output. It could be there's a problem > > resulting in Giant not being held under those circumstances, or that Giant > > is being dropped somewhere it shouldn't be. > > OK, my kernel foo is not sufficient know if that is the case, but here > is dmesg and outut from devinfo output : Indeed, if_sis is showed as GIANT-LOCKED, which means the interrupt handler is running with Giant. However, on re-reading your stack trace, it's not actually the if_sis interrupt: it's the callout/timeout that if_sis schedules, and it's marked as unconditionally CALLOUT_MPSAFE. Try this patch: Index: if_sis.c =================================================================== RCS file: /home/ncvs/src/sys/pci/if_sis.c,v retrieving revision 1.96 diff -u -r1.96 if_sis.c --- if_sis.c 17 Mar 2004 17:50:53 -0000 1.96 +++ if_sis.c 22 Apr 2004 22:17:41 -0000 @@ -1234,7 +1234,10 @@ } sc->sis_unit = unit; - callout_init(&sc->sis_stat_ch, CALLOUT_MPSAFE); + if (debug_mpsafenet) + callout_init(&sc->sis_stat_ch, CALLOUT_MPSAFE); + else + callout_init(&sc->sis_stat_ch, 0); bcopy(eaddr, (char *)&sc->arpcom.ac_enaddr, ETHER_ADDR_LEN); /*