From owner-svn-src-user@FreeBSD.ORG Sat Aug 6 12:08:54 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 E01FA106564A; Sat, 6 Aug 2011 12:08:53 +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 D10058FC12; Sat, 6 Aug 2011 12:08:53 +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 p76C8rDx051069; Sat, 6 Aug 2011 12:08:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p76C8ruq051067; Sat, 6 Aug 2011 12:08:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201108061208.p76C8ruq051067@svn.freebsd.org> From: Adrian Chadd Date: Sat, 6 Aug 2011 12:08:53 +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: r224678 - 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: Sat, 06 Aug 2011 12:08:54 -0000 Author: adrian Date: Sat Aug 6 12:08:53 2011 New Revision: 224678 URL: http://svn.freebsd.org/changeset/base/224678 Log: Add a comment about a recursive lock which I've discovered whilst debugging. Primarily so I don't forget. 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 Sat Aug 6 11:43:00 2011 (r224677) +++ user/adrian/if_ath_tx/sys/dev/ath/if_ath_tx.c Sat Aug 6 12:08:53 2011 (r224678) @@ -1813,6 +1813,28 @@ ath_tx_tid_free_pkts(struct ath_softc *s /* * Flush all software queued packets for the given node. + * + * XXX there's a recursive lock here which currently panics + * XXX the kernel. + * + * bringing the interface down/up causes a flush on interface + * _up_; the stack looks like this: + * + * + * ath_tx_node_flush - locks each hardware txq + * ieee80211_free_node + * ath_tx_freebuf + * ath_tx_default_comp + * ath_tx_processq - locks the hardware txq + * + * To fix? Not (yet) sure. Perhaps unsched the TID in freebuf + * if there's no further buffers for it; then only flush + * nodes w/ a lock below if the qlen is 0. But can the tid + * txq length be checked without having the txq locked? + * It'll be locked by someone, but if this node is being freed, + * in theory all references to the node should be released + * and thus there shouldn't be any packets in the TIDs for that + * node. Hm. */ void ath_tx_node_flush(struct ath_softc *sc, struct ath_node *an)