From owner-svn-src-all@freebsd.org Sat Mar 26 08:59:57 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D2B8FADC6F3; Sat, 26 Mar 2016 08:59:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F6215AE; Sat, 26 Mar 2016 08:59:57 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2Q8xulA013266; Sat, 26 Mar 2016 08:59:56 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2Q8xuI7013265; Sat, 26 Mar 2016 08:59:56 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201603260859.u2Q8xuI7013265@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 26 Mar 2016 08:59:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297287 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Mar 2016 08:59:57 -0000 Author: avos Date: Sat Mar 26 08:59:56 2016 New Revision: 297287 URL: https://svnweb.freebsd.org/changeset/base/297287 Log: net80211: fix panic for DWDS vaps Since r248069, TX IC lock must obtained before calling ieee80211_encap() and/or ieee80211_parent_xmitpkt(). Tested with: Intel 3945BG. Modified: head/sys/net80211/ieee80211_wds.c Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Sat Mar 26 06:59:01 2016 (r297286) +++ head/sys/net80211/ieee80211_wds.c Sat Mar 26 08:59:56 2016 (r297287) @@ -288,9 +288,11 @@ ieee80211_dwds_mcast(struct ieee80211vap /* * Encapsulate the packet in prep for transmission. */ + IEEE80211_TX_LOCK(ic); mcopy = ieee80211_encap(vap, ni, mcopy); if (mcopy == NULL) { /* NB: stat+msg handled in ieee80211_encap */ + IEEE80211_TX_UNLOCK(ic); ieee80211_free_node(ni); continue; } @@ -298,6 +300,7 @@ ieee80211_dwds_mcast(struct ieee80211vap mcopy->m_pkthdr.rcvif = (void *) ni; err = ieee80211_parent_xmitpkt(ic, mcopy); + IEEE80211_TX_UNLOCK(ic); if (!err) { if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1);