From owner-freebsd-current@FreeBSD.ORG Wed Nov 29 18:21:44 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A0EEF16A4A0; Wed, 29 Nov 2006 18:21:44 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8323943CA3; Wed, 29 Nov 2006 18:21:38 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kATIL8qs092792; Wed, 29 Nov 2006 13:21:34 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-current@freebsd.org Date: Wed, 29 Nov 2006 12:39:56 -0500 User-Agent: KMail/1.9.1 References: <20061129.015826.74756053.haro@h4.dion.ne.jp> <20061128180811.P95096@fledge.watson.org> <456C90F9.5080209@errno.com> In-Reply-To: <456C90F9.5080209@errno.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611291239.57043.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 29 Nov 2006 13:21:35 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2258/Wed Nov 29 07:04:15 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Robert Watson , Munehiro Matsuda Subject: Re: LOR with netisr changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 29 Nov 2006 18:21:44 -0000 On Tuesday 28 November 2006 14:41, Sam Leffler wrote: > Robert Watson wrote: > > > > On Wed, 29 Nov 2006, Munehiro Matsuda wrote: > > > >> JFYI, I got following LOR started after the netisr changes: > > > > In general, device driver locks should not be held over entry to the > > network stack. However, things get a bit tricky in the 802.11 code due > > to lock sharing, I believe, so it could be a bit more tricky to fix that. > > It's just a bug in the driver. Driver locks should be dropped when > packets get passed up the stack. This issue was pointed out before iwi > ever was committed but since nothing immediately comes back via the > bridge (or similar) it's been ignored. How about this: Index: if_iwi.c =================================================================== RCS file: /usr/cvs/src/sys/dev/iwi/if_iwi.c,v retrieving revision 1.42 diff -u -r1.42 if_iwi.c --- if_iwi.c 7 Nov 2006 19:03:42 -0000 1.42 +++ if_iwi.c 29 Nov 2006 17:38:12 -0000 @@ -1310,6 +1310,7 @@ bpf_mtap2(sc->sc_drvbpf, tap, sc->sc_rxtap_len, m); } + IWI_UNLOCK(sc); ni = ieee80211_find_rxnode(ic, mtod(m, struct ieee80211_frame_min *)); @@ -1319,6 +1320,7 @@ /* node is no longer needed */ ieee80211_free_node(ni); + IWI_LOCK(sc); if (sc->sc_softled) { /* * Blink for any data frame. Otherwise do a (I'm unsure if the net82011 layer protects 'ic' or if the driver is supposed to do that.) -- John Baldwin