Date: Sun, 24 Mar 2013 04:09:54 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248676 - head/sys/dev/ath Message-ID: <201303240409.r2O49sRg013114@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Mar 24 04:09:54 2013 New Revision: 248676 URL: http://svnweb.freebsd.org/changeset/base/248676 Log: Move the TXQ lock earlier in this routine - so to correctly protect the link pointer check. Modified: head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Sun Mar 24 04:09:29 2013 (r248675) +++ head/sys/dev/ath/if_ath_tx.c Sun Mar 24 04:09:54 2013 (r248676) @@ -702,6 +702,8 @@ ath_tx_handoff_mcast(struct ath_softc *s KASSERT((bf->bf_flags & ATH_BUF_BUSY) == 0, ("%s: busy status 0x%x", __func__, bf->bf_flags)); + + ATH_TXQ_LOCK(txq); if (txq->axq_link != NULL) { struct ath_buf *last = ATH_TXQ_LAST(txq, axq_q_s); struct ieee80211_frame *wh; @@ -715,7 +717,6 @@ ath_tx_handoff_mcast(struct ath_softc *s /* link descriptor */ *txq->axq_link = bf->bf_daddr; } - ATH_TXQ_LOCK(txq); ATH_TXQ_INSERT_TAIL(txq, bf, bf_list); ath_hal_gettxdesclinkptr(sc->sc_ah, bf->bf_lastds, &txq->axq_link); ATH_TXQ_UNLOCK(txq);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303240409.r2O49sRg013114>