Date: Thu, 25 Feb 2016 07:03:10 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296024 - head/sys/dev/hyperv/netvsc Message-ID: <201602250703.u1P73AhJ032750@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201602250703.u1P73AhJ032750>