From owner-svn-src-all@FreeBSD.ORG Sun Dec 9 01:08:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DB3ACC8; Sun, 9 Dec 2012 01:08:45 +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 29C8F8FC13; Sun, 9 Dec 2012 01:08:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qB918jh4055045; Sun, 9 Dec 2012 01:08:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qB918iUW055043; Sun, 9 Dec 2012 01:08:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201212090108.qB918iUW055043@svn.freebsd.org> From: Adrian Chadd Date: Sun, 9 Dec 2012 01:08:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244044 - 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.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: Sun, 09 Dec 2012 01:08:45 -0000 Author: adrian Date: Sun Dec 9 01:08:44 2012 New Revision: 244044 URL: http://svnweb.freebsd.org/changeset/base/244044 Log: Don't panic if the stageq here is empty; just fall through with NULL pointers and leave the stage queue flush routine to just do nothing (since both head and tail here will be NULL.) This should quieten the "stageq empty" panic where the stageq itself is empty, but it won't fix the second KASSERT() here "staging queue empty" as that's likely a different underlying problem. PR: kern/174283 Modified: head/sys/net80211/ieee80211_superg.c head/sys/net80211/ieee80211_superg.h Modified: head/sys/net80211/ieee80211_superg.c ============================================================================== --- head/sys/net80211/ieee80211_superg.c Sun Dec 9 00:32:38 2012 (r244043) +++ head/sys/net80211/ieee80211_superg.c Sun Dec 9 01:08:44 2012 (r244044) @@ -547,6 +547,14 @@ ff_flush(struct mbuf *head, struct mbuf /* * Age frames on the staging queue. + * + * This is called without the comlock held, but it does all its work + * behind the comlock. Because of this, it's possible that the + * staging queue will be serviced between the function which called + * it and now; thus simply checking that the queue has work in it + * may fail. + * + * See PR kern/174283 for more details. */ void ieee80211_ff_age(struct ieee80211com *ic, struct ieee80211_stageq *sq, @@ -557,7 +565,9 @@ ieee80211_ff_age(struct ieee80211com *ic struct ieee80211_node *ni; struct ieee80211_tx_ampdu *tap; +#if 0 KASSERT(sq->head != NULL, ("stageq empty")); +#endif IEEE80211_LOCK(ic); head = sq->head; Modified: head/sys/net80211/ieee80211_superg.h ============================================================================== --- head/sys/net80211/ieee80211_superg.h Sun Dec 9 00:32:38 2012 (r244043) +++ head/sys/net80211/ieee80211_superg.h Sun Dec 9 01:08:44 2012 (r244044) @@ -87,6 +87,10 @@ struct mbuf *ieee80211_ff_check(struct i void ieee80211_ff_age(struct ieee80211com *, struct ieee80211_stageq *, int quanta); +/* + * See ieee80211_ff_age() for a description of the locking + * expectation here. + */ static __inline void ieee80211_ff_flush(struct ieee80211com *ic, int ac) { @@ -96,6 +100,10 @@ ieee80211_ff_flush(struct ieee80211com * ieee80211_ff_age(ic, &sg->ff_stageq[ac], 0x7fffffff); } +/* + * See ieee80211_ff_age() for a description of the locking + * expectation here. + */ static __inline void ieee80211_ff_age_all(struct ieee80211com *ic, int quanta) {