Date: Mon, 04 Dec 2006 00:49:50 +0900 (JST) From: Munehiro Matsuda <haro@h4.dion.ne.jp> To: jhb@freebsd.org, bzeeb-lists@lists.zabbadoz.net Cc: freebsd-current@freebsd.org, rwatson@freebsd.org Subject: Re: LOR with netisr changes Message-ID: <20061204.004950.74755916.haro@h4.dion.ne.jp> In-Reply-To: <200611291239.57043.jhb@freebsd.org> References: <20061128180811.P95096@fledge.watson.org> <456C90F9.5080209@errno.com> <200611291239.57043.jhb@freebsd.org> <20061202122415.A91892@maildrop.int.zabbadoz.net>
next in thread | previous in thread | raw e-mail | index | archive | help
From: John Baldwin <jhb-at-freebsd.org> Date: Wed, 29 Nov 2006 12:39:56 -0500 ::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: <snip> ::(I'm unsure if the net82011 layer protects 'ic' or if the driver is supposed ::to do that.) Sorry for the late reply, and thanks for the patch. I needed to tweak the patch to make it compile, but seems to work fine. Modified patch attached. From: "Bjoern A. Zeeb" <bzeeb-lists-at-lists.zabbadoz.net> Date: Sat, 2 Dec 2006 12:25:28 +0000 (UTC) ::ok, whoever is going to take care of this and perhaps commit the fix ::let me know. I assigned it LOR ID 194 on "The LOR page": :: http://sources.zabbadoz.net/freebsd/lor.html#194 LOR seems to be gone with the patch, so it could be removed when committed. Thanks, Haro --- if_iwi.c.org 9 Nov 2006 16:05:43 -0000 +++ if_iwi.c 3 Dec 2006 14:17:45 -0000 @@ -1230,6 +1230,7 @@ struct mbuf *mnew, *m; struct ieee80211_node *ni; int type, error, framelen; + IWI_LOCK_DECL; framelen = le16toh(frame->len); if (framelen < IEEE80211_MIN_LEN || framelen > MCLBYTES) { @@ -1310,6 +1311,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 +1321,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 =------------------------------------------------------------------------------ _ _ Munehiro (haro) Matsuda -|- /_\ |_|_| Internet Solution Dept., KGT Inc. /|\ |_| |_|_| 2-8-8 Shinjuku Shinjuku-ku Tokyo 160-0022, Japan Tel: +81-3-3225-0767 Fax: +81-3-3225-0740
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061204.004950.74755916.haro>