svn commit: r296024 - head/sys/dev/hyperv/netvsc
Sepherosa Ziehau
sephe at FreeBSD.org
Thu Feb 25 07:03:11 UTC 2016
Author: sephe
Date: Thu Feb 25 07:03:10 2016
New Revision: 296024
URL: https://svnweb.freebsd.org/changeset/base/296024
Log:
hyperv/hn: Hold the TX ring lock then drain TX desc buf_ring
Reported by: Hongxiong Xian <v-hoxian microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Modified:
head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
Modified: head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 04:32:17 2016 (r296023)
+++ head/sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c Thu Feb 25 07:03:10 2016 (r296024)
@@ -2326,8 +2326,10 @@ hn_destroy_tx_ring(struct hn_tx_ring *tx
hn_txdesc_dmamap_destroy(txd);
}
#else
+ mtx_lock(&txr->hn_tx_lock);
while ((txd = buf_ring_dequeue_sc(txr->hn_txdesc_br)) != NULL)
hn_txdesc_dmamap_destroy(txd);
+ mtx_unlock(&txr->hn_tx_lock);
#endif
if (txr->hn_tx_data_dtag != NULL)
More information about the svn-src-all
mailing list