From owner-svn-src-all@FreeBSD.ORG Thu Jan 17 16:26:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AA4976D5; Thu, 17 Jan 2013 16:26:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C759CD8; Thu, 17 Jan 2013 16:26:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0HGQexr008087; Thu, 17 Jan 2013 16:26:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0HGQe1Q008086; Thu, 17 Jan 2013 16:26:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201301171626.r0HGQe1Q008086@svn.freebsd.org> From: Adrian Chadd Date: Thu, 17 Jan 2013 16:26:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245554 - head/sys/dev/ath 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.14 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: Thu, 17 Jan 2013 16:26:40 -0000 Author: adrian Date: Thu Jan 17 16:26:40 2013 New Revision: 245554 URL: http://svnweb.freebsd.org/changeset/base/245554 Log: Add a quick work-around if ath_beacon_config() to not die if it's called when an interface is going down. Right now it's quite possible (but very unlikely!) that ath_reset() or similar is called, leading to a beacon config call, in parallel with the last VAP being destroyed. This likely should be fixed by making sure the bmiss/bstuck/watchdog taskqueues are canceled whenever the last VAP is destroyed. Modified: head/sys/dev/ath/if_ath_beacon.c Modified: head/sys/dev/ath/if_ath_beacon.c ============================================================================== --- head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:11:38 2013 (r245553) +++ head/sys/dev/ath/if_ath_beacon.c Thu Jan 17 16:26:40 2013 (r245554) @@ -705,6 +705,16 @@ ath_beacon_config(struct ath_softc *sc, if (vap == NULL) vap = TAILQ_FIRST(&ic->ic_vaps); /* XXX */ + /* + * Just ensure that we aren't being called when the last + * VAP is destroyed. + */ + if (vap == NULL) { + device_printf(sc->sc_dev, "%s: called with no VAPs\n", + __func__); + return; + } + ni = ieee80211_ref_node(vap->iv_bss); /* extract tstamp from last beacon and convert to TU */