Author: adrian Date: Fri Feb 24 05:40:36 2012 New Revision: 232097 URL: http://svn.freebsd.org/changeset/base/232097
Log: Hold IF_LOCK when manipulating the interface flags. It doesn't _really_ help all that much, I'll commit something to sys/net/if.c at some point explaining why, but the lock should be held when checking/manipulating/branching because of said lock. Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Fri Feb 24 05:39:00 2012 (r232096) +++ head/sys/net80211/ieee80211_output.c Fri Feb 24 05:40:36 2012 (r232097) @@ -157,8 +157,10 @@ ieee80211_start(struct ifnet *ifp) "%s: ignore queue, in %s state\n", __func__, ieee80211_state_name[vap->iv_state]); vap->iv_stats.is_tx_badstate++; - ifp->if_drv_flags |= IFF_DRV_OACTIVE; IEEE80211_UNLOCK(ic); + IFQ_LOCK(&ifp->if_snd); + ifp->if_drv_flags |= IFF_DRV_OACTIVE; + IFQ_UNLOCK(&ifp->if_snd); return; } IEEE80211_UNLOCK(ic); @@ -389,7 +391,9 @@ ieee80211_output(struct ifnet *ifp, stru struct ieee80211_frame *wh; int error; + IFQ_LOCK(&ifp->if_snd); if (ifp->if_drv_flags & IFF_DRV_OACTIVE) { + IFQ_UNLOCK(&ifp->if_snd); /* * Short-circuit requests if the vap is marked OACTIVE * as this can happen because a packet came down through @@ -400,6 +404,7 @@ ieee80211_output(struct ifnet *ifp, stru */ senderr(ENETDOWN); } + IFQ_UNLOCK(&ifp->if_snd); vap = ifp->if_softc; /* * Hand to the 802.3 code if not tagged as _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"