From owner-svn-src-user@FreeBSD.ORG Fri Aug 12 14:59:21 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7654106566B; Fri, 12 Aug 2011 14:59:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 96EAF8FC1C; Fri, 12 Aug 2011 14:59:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p7CExL5i068492; Fri, 12 Aug 2011 14:59:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p7CExL2m068490; Fri, 12 Aug 2011 14:59:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108121459.p7CExL2m068490@svn.freebsd.org> From: Adrian Chadd Date: Fri, 12 Aug 2011 14:59:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r224799 - user/adrian/if_ath_tx/sys/dev/ath X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2011 14:59:21 -0000 Author: adrian Date: Fri Aug 12 14:59:21 2011 New Revision: 224799 URL: http://svn.freebsd.org/changeset/base/224799 Log: Fix some missing locks: * I didn't delete an ATH_TXQ_UNLOCK() from ath_tx_cleanup(); do that * Since the tid flush function now updates the BAW, the TXQ lock is required. This may cause another LOR with the net80211 node lock. I'll investigate this later. Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Modified: user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Aug 12 14:43:37 2011 (r224798) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Fri Aug 12 14:59:21 2011 (r224799) @@ -1873,19 +1873,13 @@ ath_tx_node_flush(struct ath_softc *sc, ATH_TXQ_LOCK(txq); /* Remove this tid from the list of active tids */ ath_tx_tid_unsched(sc, an, tid); - if (! is_owned) - ATH_TXQ_UNLOCK(txq); /* Free packets */ ath_tx_tid_free_pkts(sc, an, tid); - } + if (! is_owned) + ATH_TXQ_UNLOCK(txq); - /* - * Don't hold the node lock across free_pkts; - * freeing buffers may release the node and - * that will acquire the IEEE80211_NODE_LOCK (node table). - * That then causes a lock reversal. - */ + } } /* @@ -2047,8 +2041,6 @@ ath_tx_cleanup(struct ath_softc *sc, str device_printf(sc->sc_dev, "%s: TID %d: cleanup needed: %d packets\n", __func__, tid, atid->incomp); - - ATH_TXQ_UNLOCK(txq); } static void