mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
This commit is contained in:
parent
a4965cf07b
commit
fd458696b3
1 changed files with 2 additions and 0 deletions
|
|
@ -2326,8 +2326,10 @@ hn_destroy_tx_ring(struct hn_tx_ring *txr)
|
|||
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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue