mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-14 14:21:18 +01:00
gve: Fix Tx tcpdump panic
Ringing the doorbell before making the BPF call can result in the mbuf being freed before the BPF call. Reviewed-by: markj MFC-after: 3 days Differential Revision: https://reviews.freebsd.org/D41189
This commit is contained in:
parent
5ec2d94ade
commit
74861578d9
@ -706,12 +706,12 @@ gve_xmit_br(struct gve_tx_ring *tx)
|
||||
break;
|
||||
}
|
||||
|
||||
drbr_advance(ifp, tx->br);
|
||||
BPF_MTAP(ifp, mbuf);
|
||||
|
||||
bus_dmamap_sync(tx->desc_ring_mem.tag, tx->desc_ring_mem.map,
|
||||
BUS_DMASYNC_PREWRITE);
|
||||
gve_db_bar_write_4(priv, tx->com.db_offset, tx->req);
|
||||
|
||||
drbr_advance(ifp, tx->br);
|
||||
BPF_MTAP(ifp, mbuf);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user