svn commit: r284981 - stable/7/sys/dev/bxe
David C Somayajulu
davidcs at FreeBSD.org
Tue Jun 30 20:45:42 UTC 2015
Author: davidcs
Date: Tue Jun 30 20:45:41 2015
New Revision: 284981
URL: https://svnweb.freebsd.org/changeset/base/284981
Log:
MFC r284739
tx_mtx should be grabbed before calling buf_ring_dequeue_sc()
Submitted by: Attilio.Rao at isilon.com
Modified:
stable/7/sys/dev/bxe/bxe.c
Directory Properties:
stable/7/sys/ (props changed)
Modified: stable/7/sys/dev/bxe/bxe.c
==============================================================================
--- stable/7/sys/dev/bxe/bxe.c Tue Jun 30 20:40:38 2015 (r284980)
+++ stable/7/sys/dev/bxe/bxe.c Tue Jun 30 20:45:41 2015 (r284981)
@@ -6564,10 +6564,14 @@ bxe_free_fp_buffers(struct bxe_softc *sc
#if __FreeBSD_version >= 800000
if (fp->tx_br != NULL) {
- struct mbuf *m;
/* just in case bxe_mq_flush() wasn't called */
- while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL) {
- m_freem(m);
+ if (mtx_initialized(&fp->tx_mtx)) {
+ struct mbuf *m;
+
+ BXE_FP_TX_LOCK(fp);
+ while ((m = buf_ring_dequeue_sc(fp->tx_br)) != NULL)
+ m_freem(m);
+ BXE_FP_TX_UNLOCK(fp);
}
buf_ring_free(fp->tx_br, M_DEVBUF);
fp->tx_br = NULL;
More information about the svn-src-stable-7
mailing list