From owner-svn-src-head@FreeBSD.ORG Wed Aug 12 21:19:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A1341065678; Wed, 12 Aug 2009 21:19:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1BEAC8FC4F; Wed, 12 Aug 2009 21:19:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CLJJmr077113; Wed, 12 Aug 2009 21:19:20 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLJJlk077111; Wed, 12 Aug 2009 21:19:19 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122119.n7CLJJlk077111@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:19:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196159 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:19:21 -0000 Author: sam Date: Wed Aug 12 21:19:19 2009 New Revision: 196159 URL: http://svn.freebsd.org/changeset/base/196159 Log: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Spotted by: thompsa Reviewed by: rwatson Approved by: re (rwatson) Modified: head/sys/net80211/ieee80211.c Modified: head/sys/net80211/ieee80211.c ============================================================================== --- head/sys/net80211/ieee80211.c Wed Aug 12 21:06:43 2009 (r196158) +++ head/sys/net80211/ieee80211.c Wed Aug 12 21:19:19 2009 (r196159) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next);