Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Aug 2011 12:08:53 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r224678 - user/adrian/if_ath_tx/sys/dev/ath
Message-ID:  <201108061208.p76C8ruq051067@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:
+ *
+ * <panic>
+ * 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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108061208.p76C8ruq051067>