Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Jul 2005 11:46:56 -0400
From:      Craig Rodrigues <rodrigc@crodrigues.org>
To:        freebsd-current@freebsd.org
Subject:   Re: Panic in bpf, maybe related to if_xl
Message-ID:  <20050713154656.GA1516@crodrigues.org>
In-Reply-To: <20050713125038.Q926@fledge.watson.org>
References:  <20050713031229.GA933@crodrigues.org> <20050713125038.Q926@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jul 13, 2005 at 12:51:53PM +0100, Robert Watson wrote:
> It looks like if_xl is not properly acquiring Giant when entering the 
> network stack when running with debug.mpsafenet=0.  It should be calling 
> NET_LOCK_GIANT() in the task queue before calling if_input().

Gleb Smirnoff provided me with this patch which I am testing now.
Things seem better......


Index: if_xl.c
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_xl.c,v
retrieving revision 1.190
diff -u -r1.190 if_xl.c
--- if_xl.c	10 Jun 2005 16:49:23 -0000	1.190
+++ if_xl.c	13 Jul 2005 13:27:36 -0000
@@ -2100,9 +2100,11 @@
 {
 	struct xl_softc *sc = (struct xl_softc *)arg;
 
+	NET_LOCK_GIANT();
 	XL_LOCK(sc);
 	xl_rxeof(sc);
 	XL_UNLOCK(sc);
+	NET_UNLOCK_GIANT();
 }
 
 /*



-- 
Craig Rodrigues        
rodrigc@crodrigues.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050713154656.GA1516>